Form.AddGroupBox
The AddGroupBox function allows the script to add a section box to the Form. Typically, section boxes are used to group controls on the Form.
Syntax |
Form.AddGroupBox(X, Y, Width, Height, Text) |
Description |
Adds a section box to a Form. |
Arguments |
X {integer}. Represents the horizontal position of the section box on the Form—the position on the 'X-Axis' at which the section box begins. The number represents a percentage of the Form's X coordinate, where 0 is absolute left. Y {integer} Represents the vertical position of the section box on the Form—the position on the 'Y-Axis' at which the section box begins. The number represents a percentage of the Form's Y coordinate, where 0 is the top of the Form. Width {integer} Defines the width of the section box. Height {integer} Defines the height of the section box. Text {string} The text that is shown at the top of the section box (the label of the section box). The Text argument is optional. |
Returns |
Group Box Control Object Group Box Control Objects have common Control Object Properties as well as their own specific properties that can be used in the script (see Group Box Properties). |
Example:
Set SectionBoxTitle = Form.AddGroupBox(0,0,100,8,"This is the Text for the Section Box")
This adds a section box to the Form. The section box is positioned at the coordinates 0,0 (top left corner as the coordinates are 0% of the Form's coordinates) and is 100 wide and 8 high. It has a text value of "This is the Text for the Section Box" which is shown as a label:
The Control Object that is returned by the AddGroupBox function is stored in the SectionBoxTitle variable that is defined earlier in the script.