News: SPECIAL OFFER: EZGUI Classic (4.0) until May 31, 2013 only $29 ! 

TO REGISTER on Forum, contact tech support: http://cwsof.com/support.html
 
Pages: [1]   Go Down
  Print  
Author Topic: New Auto resize  (Read 567 times)
Russ Srole
Newbie
*
Posts: 22


View Profile
« on: April 02, 2011, 09:16:32 PM »

Chris,

Do you have an example using the new auto resizing commands.  I made my main for sizable & changed a couple of controls to EZ_UseAutoSize "FL,VH" in the designer.  But when I resize the form, the controls don't change.  I guess I need to call something in %Ez_size?  But what?

Thanks,
Russ
« Last Edit: April 02, 2011, 09:50:27 PM by Chris Boss » Logged
Chris Boss
Administrator
Hero Member
*****
Posts: 1814


View Profile
« Reply #1 on: April 02, 2011, 09:50:06 PM »

Maybe I didn't explain this well in the help file, so I'll explain it here.

The autosize engine sends an event to the form which is:

%EZ_NoAutoSize

This event is sent when the form is resized, indicating the autosize engine has a resize table.

By default the engine does not resize the controls!

You need to process this event like this:

Code:
CASE %EZ_NoAutoSize
     Cancel&=1

This will cancel the event and the engine will then auto resize the controls.

By processing this event you explicitly tell the form, to let autosizing occur.

By using an event to in essence allow you to turn autosizing on and off, it allows you to override the autosize engine.

Logged
Chris Boss
Administrator
Hero Member
*****
Posts: 1814


View Profile
« Reply #2 on: April 02, 2011, 10:25:43 PM »

From the help file (under EZ_UseAutoSize):

Quote
The parent form will get the %EZ_NoAutoSize event if any of its controls have had the AutoResize mode defined. By default EZGUI will not autosize the controls unless you set Cancel& to 1 for the %EZ_NoAutoSize event.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: