GROUPBOX

Syntax

ctl[n]: GROUPBOX(Class Specific Properties), Other Properties

Description

The Groupbox is a rectangular outline with a text label that can be used to visually surround a number of related controls. It is also useful for defining groups of Radiobuttons. Note that the groupbox is not an actionable control.

Class Specific Properties

CENTER
Aligns the text label to the center.
FLAT
Gives the groupbox a flat appearance.
GROUP
Defines the end of the radio button group.
LEFT
Aligns the text label to the left. (default)
RIGHT
Aligns the text label to the right.

Other Properties

Text
Defines text to be put on the top line of the groupbox area (default = no text)
Val
Assigns a value to the groupbox (default = 0)
Color
Sets text background color (default = transparent)
FontColor
Sets text color (default = white)

Example

ctl[1]: GROUPBOX(CENTER), Text="Groupie", Size=(70,50), Color=CadetBlue, FontColor=Red

Example fml code

//groupbox examples
%fml

int leftEdge = 300;
int topEdge = 10;
int groupVertInc = 40;
int vertInc = 10;
int xSize = 70;
int ySize = 20;
int groupX = 90;
int groupY = 40;

int top, groupTop;

groupTop = topEdge;
top =  groupTop + 10;
ctl[0]: RADIOBUTTON(GROUP), "Remove white"; 
setCtlVal ( 0, 1 ); 
setCtlPos ( 0, leftEdge+10, top, xSize-10, ySize );

ctl[1]: RADIOBUTTON(MULTILINE, TOP), "Adjust contrast and remove color";
setCtlVal ( 1, 0 ); 
setCtlPos ( 1, leftEdge+10 +xSize, top, xSize-10, ySize );

ctl[2]: GROUPBOX(GROUP, LEFT), "RADIOBUTTON Test"; 
setCtlPos ( 2, leftEdge, groupTop, groupX + 60, groupY-vertInc );
//
groupTop = groupTop + groupVertInc - 10;
top =  groupTop + 5;
ctl[10]: CHECKBOX(GROUP), "Remove white"; 
setCtlVal ( 10, 1 ); 
setCtlPos ( 10, leftEdge+10, top, xSize-10, ySize );

top = top + vertInc;
ctl[11]: CHECKBOX(GROUP), "Remove black"; 
setCtlVal ( 11, 1 ); 
setCtlPos ( 11, leftEdge+20, top, xSize-10, ySize );

top = top + vertInc + 5;
ctl[12]: CHECKBOX(MULTILINE, TOP), "Adjust contrast and remove color";
setCtlPos ( 12, leftEdge+30, top, xSize, ySize );

ctl[13]: GROUPBOX(GROUP, CENTER), "CHECKBOX Test"; 
setCtlPos ( 13, leftEdge, groupTop, groupX+20, groupY+vertInc);
//
groupTop = groupTop + groupVertInc + vertInc;
top =  groupTop + 10;
ctl[20]: PUSHBUTTON(GROUP), "Remove white";
setCtlVal ( 20, 1 ); 
setCtlPos ( 20, leftEdge+10, top, xSize-10, ySize );

top = top + vertInc + 5;
ctl[21]: PUSHBUTTON(MULTILINE, TOP), "Adjust contrast and remove color";
setCtlPos ( 21, leftEdge+10, top+vertInc , xSize, ySize );

ctl[22]: GROUPBOX(GROUP, RIGHT), "PUSHBUTTON Test";
setCtlPos ( 22, leftEdge, groupTop, groupX, groupY+20 );
%%eof

See Also

RADIOBUTTON

Comments

Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.