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 in the Controls palette.
  2. Draw a rectangle on your form approximately where you want your group box to be 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.

Do you want...

Then use...

to change the label at the top of the group box?

the Text Property property.

to change the name of the group box that identifies it to the procedure?

the (Name) Property property.

to change the size or location of the group box?

the Bottom Property, Left Property, Right Property, and Top Property properties.

a style sheet.

(You can also move or resize the group box directly in the form.)

to change the color of the group box?

the BorderColor Property property to determine the color of the border.

the ForeColor Property property to determine the color of the text in the label.

a style sheet.

to change the label font?

the Font Property property.

a style sheet.

to change the alignment of the label (left-justified, centered, or right-justified)?

the Alignment Property property.

a style sheet.

to change the border type or width?

the Border Property property to determine the type of border (none, normal, 3D, and so on).

the BorderWidth Property property to determine the width of the border.

a style sheet.

to change what the cursor looks like when it is on top of the group box?

the CursorPointer Property property.

a style sheet.

to make the group box inactive or make it invisible?

the Enabled Property property to determine whether the group box is active or not. (If the group box is inactive, it will be grayed out and nothing will happen when the end user clicks it.)

the Visible Property property to determine whether the group box is visible to the end user.

a style sheet.

to display a tool tip when the cursor is on top of the group box?

the ToolTipText Property property. The tool tip applies to the whole inner area, including any controls within it (unless these controls have their own tool tips).

to assign a help topic to the group box?

the Help property. For more information, see Assigning Help to Your Forms and Controls.

to move the group box to another layer?

the Layer property. For more information, see Layering Controls.

to control the display order of the group box when more than one control is overlaid?

the ZIndex Property.

Note: IE7 or equivalent required.


WebFOCUS