Cicode Programming Reference > Cicode Function Categories > Form Functions Introduction > FormGroupBox

FormGroupBox

Adds a group box to the current form. A group box is a form control box drawn to the specified size. If the box contains radio buttons, they are grouped together. You should call this function only after the FormNew() function and before the FormRead() function.

The group box is added to the form at the specified column and row position with the specified width and height. Use the FormRadioButton() function to add the radio buttons to the box, and call this function between each group of radio buttons.

Syntax

FormGroupBox(Col, Row, Width, Height [, Text] )

Col:

The number of the column in which the group box will be placed. Enter a number from 0 (column 1) to the form width - 1. For example, to place the group box in column 8, enter 7.

Row:

The number of the row in which the group box will be placed. Enter a number from 0 (row 1) to the form height - 1. For example, to place the group box in row 6, enter 5.

Width:

The width of the group box, which should be wide enough to display your widest item.

Height:

The height of the group box.

Text:

The text to display as the group box label.

Return Value

The field handle if the group box is successfully added, otherwise -1 is returned.

Related Functions

FormNew, FormRead, FormRadioButton

Example

! Create a form, add to radio buttons groups and then display the 
form
! The operator may select one of the radio buttons from each group
FUNCTION FnMenu()
STRING sFast, sSlow, sMedium;
STRING sNorth, sSouth, sEast, sWest;
FormNew("Select Item",40,7,1);
FormGroupBox(1 ,1, 15, 5, "Speed");
FormRadioButton(2 ,2,"Fast", sFast);
FormRadioButton(2, 3,"Medium", sMedium);
FormRadioButton(2 ,4,"Slow", sSlow);
FormGroupBox(19 ,2, 15, 6, "Direction");
FormRadioButton(20 ,2,"North", sNorth);
FormRadioButton(20, 3,"South", sSouth);
FormRadioButton(20 ,4,"East", sEast);
FormRadioButton(20 ,5,"West", sWest);
FormRead(0);
END

See Also

Form Functions