Navigation: ABC Library Reference > WindowResizeClass > WindowResizeClass Methods >====== SetAnchor(set control's anchor strategy) ====== | |
SetAnchor ( control, anchorStrategy )
SetAnchor | Sets the specific anchor strategy for a window control. |
Control | An integer constant, variable, EQUATE, or expression containing a control number. |
anchorStrategy | An integer constant, variable, EQUATE, or expression indicating the anchor strategy to apply to the control. There are five anchor strategies that are identified easily by a default set of EQUATES:Anchor:None EQUATE(0000b)Anchor:Right EQUATE(0001b)Anchor:Left EQUATE(0010b)Anchor:Top EQUATE(0100b)Anchor:Bottom EQUATE(1000b) |
The SetAnchor method is used to set the appropriate anchors for a control. Control's are anchored with respect to their parent control.
Implementation: The Resizer Init method calls the SetAnchor method just after setting the parent control defaults via the SetParentsDefaults method. Anchoring is actually a variation of the centered resize strategy.
Example:
Resizer.Init PROCEDURE(BYTE AppStrategy=AppStrategy:Resize,|
BYTE SetWindowMinSize=False,BYTE SetWindowMaxSize=False)
CODE
PARENT.Init(AppStrategy,SetWindowMinSize,SetWindowMaxSize)
SELF.SetParentDefaults()!Calculate default control parent-child
!relationships based upon their positions
!on the window
SELF.SetAnchor(?BOButton,Anchor:Bottom)
See Also: SetParentDefaults