| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > WindowResizeClass > WindowResizeClass Methods >====== GetParentControl (return parent control) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[windowresizeclass functional organization expected use.htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[getpositionstrategy return position strategy for a control type .htm|{{btn_next_n.gif|Next page}}]] | | || **GetParentControl( **//control// **), VIRTUAL** {{blk2blue.jpg|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 resize and reposition controls .htm|Resize]], [[setparentcontrol set parent control .htm|SetParentControl]], [[setparentdefaults set default parent controls .htm|SetParentDefaults]]