getGroupBox

>>-anAdvancedControl~getGroupBox(--id--+-------------+--)------><
                                       +-,--category-+


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.

Arguments:

The arguments are:

id

The resource ID of the group box.

category

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.

Example:

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)")
  end
  else do
    gb~setTitle("Phone Numbers")
  end

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().