Jump to content

Event when frame change size


artem_niko

Recommended Posts

Hello!

I need execute somebody event when frame change own size.

For example.

I have a UniForm and frame. This is frame creating in this UniForm. And when UniForm change own size, frame also change own size and at this moment I want run my event, for example, ShowMessage('ololo');

Event must be executing only when frame change own size, not UniForm.

Is it possible make?

Link to comment
Share on other sites

2 hours ago, Артем said:

Event must be executing only when frame change own size, not UniForm.

Hello,

Can you please explain?

2 hours ago, Артем said:

I have a UniForm and frame. This is frame creating in this UniForm. And when UniForm change own size, frame also change own size

Make a simple testcase if possible...

Link to comment
Share on other sites

1 minute ago, Sherzod said:

Hello,

Can you please explain?

Make a simple testcase if possible...

Do you know about event of form as know as Maximize? If not use UniGUI and use standart Win32 project on VCL.

I need analog of this event. When form maximize - frame also change own size and on this moment I must show message.

Link to comment
Share on other sites

2 minutes ago, Артем said:

Do you know about event of form as know as Maximize?

Yes, I know.

 

4 minutes ago, Артем said:

I need analog of this event. When form maximize...

Maybe you want this event?

YourForm.ClientEvents.ExtEvents ->

function window.maximize(sender, eOpts)
{
    
}

 

  • Upvote 1
Link to comment
Share on other sites

10 minutes ago, Sherzod said:

Yes, I know.

 

Maybe you want this event?

YourForm.ClientEvents.ExtEvents ->


function window.maximize(sender, eOpts)
{
    
}

 

Hm...Maybe...

And what about Frame?

Is it event 

YourFrame.ClientEvents.ExtEvents ->

function resize(sender, width, height, oldWidth, oldHeight, eOpts)
{

}

Is analog of event form?

YourForm.ClientEvents.ExtEvents ->

function window.maximize(sender, eOpts)
{
    
}
Link to comment
Share on other sites

i use this WorkAround:

 

Please set a uniImage in the background of your frame (without Picture - just the uniImage)

set all Anchors ..

 

and test following code:

procedure TyourFrameName.UniImage1Resize(Sender: TUniControl; OldWidth,
  OldHeight: Integer);
begin
 a_test_uniLabel.Caption:=inttostr(UniImage1.Width) +' - '+ inttostr(UniImage1.Height)
end;

 

if you resize your frame OR the Webbrowser - you will get the event ... and if your image is Aligne: alClient - you will get the Width and Height of your frame

 

 

Hope this helps :-)

 

Erich

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...