GetPositionStrategy (return position strategy for a control type)

Top  Previous  Next


GetPositionStrategy( control type [, strategy ] )


Returns the repositioning strategy for a control type.

control type

An integer constant, variable, EQUATE, or expression indicating the type of control (BUTTON, ENTRY, LIST, etc.).


An integer constant, variable, EQUATE, or expression indicating the overall strategy for resizing and repositioning all the controls on the window. If omitted, strategy defaults to the strategy specified by the Init method.

The GetPositionStrategy method returns the appropriate repositioning strategy for a particular control type based on the overall strategy.


The Reset method calls the GetPositionStrategy method to set the position strategy for dynamically created controls.

EQUATEs for the control type parameter are declared in EQUATES.CLW. Each control type EQUATE is prefixed with CREATE:.

EQUATEs for the return value are declared in ABRESIZE.INC. Each strategy EQUATE is prefixed with Resize:.


GET(SELF.ControlQueue,SELF.ControlQueue.ID)     !get control resize info

IF ERRORCODE()                                  !if no control info, add it

SELF.ControlQueue.Type=FieldCounter{PROP:Type} ! set control type

SELF.ControlQueue.ParentID=0                   ! set parent

SELF.ControlQueue.HasChildren=False            ! set children

SELF.ControlQueue.ID=FieldCounter              ! set ID

GetSizeInfo(FieldCounter,SELF.ControlQueue.Pos)! set coordinates

                                               ! set resize strategies



ADD(SELF.ControlQueue,SELF.ControlQueue.ID)    ! add control info



See Also:     Init, Reset