User Tools

Site Tools


getparentcontrol_return_parent_control_.htm
Navigation:  ABC Library Reference > WindowResizeClass > WindowResizeClass Methods >====== GetParentControl (return parent control) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

GetParentControl( control ), VIRTUAL

blk2blue.jpg

GetParentControl Returns the parent for a window control.
control An integer constant, variable, EQUATE, or expression containing a control number. The Resize method rescales the control based on the coordinates of the parent.

The GetParentControl method returns the parent for a window control. A return value of zero indicates the WINDOW is the parent. Otherwise, the return value is the field equate of another window control.

The SetParentDefaults method intelligently sets the appropriate parent for all the window controls, and the SetParentControl method sets the parent for a single control. The Resize method rescales the control based on the coordinates of the parent.

Return Data Type:     SIGNED

Example:

window WINDOW('Nested Controls'),AT(,,165,97),IMM,GRAY,MAX,RESIZE

       GROUP('OuterGroup'),AT(5,3,154,92),USE(?OuterGroup),BOXED

        BUTTON('Button 1'),AT(14,23),USE(?Button1)

        ENTRY(@s20),AT(60,24),USE(Entry1)

        GROUP('InnerGroup'),AT(11,49,141,38),USE(?InnerGroup),BOXED

         CHECK('Check 1'),AT(32,64),USE(Check1)

         CHECK('Check 2'),AT(91,64),USE(Check2)

        END

       END

      END

CODE

OPEN(window)

Resizer.Init(AppStrategy:Spread)               !initialize Resizer object

Resizer.SetParentDefaults                      !set parents for all controls

Resizer.SetParentControl(?Button1,?OuterGroup) !override parent for a control

Resizer.SetParentControl(?Check1,?InnerGroup)  !override parent for a control

Resizer.SetParentControl(?Check2,?InnerGroup)  !override parent for a control

See Also:     Resize, SetParentControl, SetParentDefaults

getparentcontrol_return_parent_control_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1