Jump to content
sibar

How to resize a modal dialog

Recommended Posts

I doesn't seems like that modal dialog can be resized if for example the device is turned. The UI behind resizes correctly but the resize method is never called on the modal panel (or form).

I'm I missing something here?

SMS 3.1

Share this post


Link to post
Share on other sites

Try capturing the orientation change explicitly and then calling the modal forms resize event within it

function window: variant; external 'window' property;
procedure TModalForm.InitializeObject;

begin

  inherited;

  {$I 'ModlForm:impl'}

  window.addEventListener('devicemotion', @Resize, false);

end;



procedure TModalForm.Resize;

begin

  inherited;

//  your resize code here

end;

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×