Using Group Boxes

In this section:

How to:

A group box places a border on the form. You can place this border around a group of related controls to help orient your end users. Group boxes are usually cosmetic, but can help convey logical groups of controls.


Top of page

x
Procedure: How to Add a Group Box Control to Your Form
  1. Select the Group box control Group box control in the Controls palette.
  2. Draw a rectangle on your form where you want your group box at approximately the size you want.
  3. Type the text you want your group box to have and press Enter. The text should be selected automatically when you created the group box.
  4. If necessary, readjust the size and placement of your group box.

If you will be adjusting the placement of your group box and the controls it surrounds, consider grouping these objects together. For more information, see Grouping Controls.


Top of page

x
Changing Group Box Properties

When you select your group box, you will see a list of group box properties in the property sheet. Changing these properties will change what your group box looks like and what it does at run time.

Many of the styling properties can also be changed using a cascading style sheet. For more information on Cascading Style Sheets, see Using Cascading Style Sheets.

Choose your property based on the task you wish to perform:

If you want to change the label at the top of the group box, use the Text Property. For more information, see the Text Property.

If you want to change the name of the group box that identifies it to the procedure, use the (Name) Property. For more information, see the (Name) Property.

If you want to change the size or location of the group box, use the Bottom Property, Left Property, Right Property, Top Property, or use a style sheet. For more information, see the Bottom Property, Left Property, Right Property, and Top Property. You can also move or resize the group box directly in the form.

If you want to change the color of the group box, use the BorderColor Property to determine the color of the border. Use the ForeColor Property to determine the color of the text in the label. You can also use a style sheet.

If you want to change the label font, use a style sheet or use the Font Property. For more information, see the Font Property.

If you want to change the alignment of the label to left-justified, centered, or right-justified, use the Alignment Property or use a style sheet. For more information, see Alignment Property.

If you want to the change the border type or width, use the Border Property to determine the type of border (none, normal 3D, and so on), use the BorderWidth Property to determine the width of the border, or use a style sheet. For more information, see the Border Property and the BorderWidth Property.

If you want to change what the cursor looks like when it is on top of the group box, use the CursorPointer Property or use a style sheet. For more information, see the CursorPointer Property.

If you want to make the group box inactive or make it invisible, use the Enabled Property to determine whether the group box is active or not. If the group box is inactive, it will be dimmed out and nothing will happen when the end user clicks it. You can also use the Visible Property to determine whether the group box is visible to the end user or use a style sheet. For more information, see the Enabled Property and the Visible Property.

If you want to display a tooltip when the cursor is on the top of the group box, use the ToolTipText Property. The tooltip applies to the whole inner area, including any controls within it, unless these controls have their own tooltips. For more information, see the ToolTipText Property.

If you want to assign a Help topic to the group box, use the Help Property. For more information, see Assigning Help to Your Forms and Controls.

If you want to move the group box to another layer, use the Layer Property. For more information, see Layering Controls.

If you want to control the display order of the group box when more than one control is overlaid, use the ZIndex Property. For more information, see the ZIndex Property.


WebFOCUS