The getGroupBox method returns an object of the GroupBox class that represents the group box with the specified resource ID. See the GroupBox Class for more detail on group boxes.


The arguments are:


The resource ID of the group box.


The number of the category dialog page containing the requested group box. This argument must only be specified for category dialogs.

Return value:

A GroupBox object or .Nil if the underlying Windows group box control does not exist.


The following example shows how the text (label) of a group box could be changed during program execution:

::class MyPhoneBook subclass ResDialog inherit AdvancedControls

::method onUseFull
  gb = self~getGroupBox(IDC_GB_TELEPHONE)
  chkBox = self~getCheckBox(IDC_CHK_USE_FULL)
  if chkBox~checked then do
    gb~setTitle("Phone Numbers (including area code)")
  else do
    gb~setTitle("Phone Numbers")

Note: getGroupBox connects the ooDialog object with a Windows control. If the control does not exist, this connection can not be made. Therefore, this method should only be used after the Windows dialog has been created. In initDialog() or at some point in the life cycle of the dialog after initDialog().