Navigation: ABC Library Reference > WindowResizeClass > WindowResizeClass Methods >====== Resize (resize and reposition controls) ====== | |
Resize, VIRTUAL, PROC
The Resize method resizes and respositions each window control by applying the specified strategy to each control, and returns a value indicating whether ACCEPT loop processing is complete and should stop.
Resize returns Level:Benign to indicate processing of the event (typically EVENT:Sized) should continue normally; it returns Level:Notify to indicate processing is completed for the event and the ACCEPT loop should CYCLE; it returns Level:Fatal to indicate the event could not be processed and the ACCEPT loop should BREAK.
The Init method and the SetStrategy method determine the strategies to apply to each control. All resizing strategies consider the new coordinates of the each control's “parent.” By default, the WINDOW is the parent of each control. However, you may designate any control as the parent of any other control with the SetParentControl method.
Return Data Type: BYTE
Example:
OPEN(window)
Resizer.Init(AppStrategy:Surface) !init Resizer-general strategy
Resizer.SetStrategy(?CloseButton, | !set control specific strategy:
! at bottom right & fixed size
Resize:FixRight+Resize:FixBottom,Resize:LockSize)
ACCEPT
CASE EVENT()
OF EVENT:CloseWindow !on close window,
Resizer.Kill ! shut down Resizer object
OF EVENT:Sized !on sized window,
Resizer.Resize ! resize & reposition controls
END
END
See Also: Init, SetStrategy, SetParentControl