Jump to content

How can unimform height be changed based on height on content? (+hideanimation not working)


alfr

Recommended Posts

Hi, I've tried to do a Touch form similair to below. It will be used in different scenarios as a pop-up form showing different messages etc, so need the height to be dynamic based on different text length.

image.png.5375bef6f0169a499b1d9bb4ea811ffc.png

So if the form could be based on "auto" it should be correct. But doesn't matter what I do, the height of the form doesn't change. Also not possible to change/set the height manually after the form is created? Is there a way to handle this. Currently i'm using client alignmentControl.

Another problem is that the HideAnimation doesn't work (set to for example slideOut). As you can see the ShowAnimation do work as it should.

1877503481_Problemunimformheightandhideanimation.thumb.gif.82e493f7efd3b2a5c582591bb6e7ff34.gif

Also attached test case - if needed.

MobileFormHeightHideAnimation.zip

 

unigui professional 1.90.0.1537

 

Link to comment
Share on other sites

10 hours ago, alfr said:

Another problem is that the HideAnimation doesn't work (set to for example slideOut). As you can see the ShowAnimation do work as it should.

Hi,

I'm not sure if this is the correct behavior or not, although we are destroying the form and not hiding the form.

You can use this trick.

In your case:

1. frmPopup.UnimButton1.ModalResult = mrNone

2. 

procedure TfrmPopup.UnimButton1Click(Sender: TObject);
begin
  Self.WebForm.JSInterface.JSCall('hide', []);
end;

3. frmPopup.ClientEvents.ExtEvents -> 

function window.hide(sender, eOpts)
{
    ajaxRequest(sender, '_hide', []);
}

4. frmPopup.OnAjaxEvent ->

procedure TfrmPopup.UnimFormAjaxEvent(Sender: TComponent; EventName: string;
  Params: TUniStrings);
begin
  if EventName = '_hide' then Close

end;

 

Link to comment
Share on other sites

×
×
  • Create New...