Button groups

Buttons may be combined together into logical groups, which may be any of three types.

A button group is defined as follows:

button | checkbox | radio group group_id {
     group clauses
     +|– button button_id at x, y {clauses}
     … other buttons
}

Grouping buttons allows commands such as clear, hide, create, destroy, disable, display, enable, input and show to be executed for the entire group, and enables properties such as style and colour to be assigned to the group. All buttons in a group must appear in the same window, and no button may be part of more than one group.

Buttons that belong to groups can nonetheless be treated individually. Any command that may be executed for a button group may also be executed for an individual button or buttons within it, and group properties can be overridden at button level.

Multi buttons (radio and checkbox) must always be grouped. Push buttons may be grouped or ungrouped.

The first_control() and next_object() functions can be used to step through all the controls in a group.



RELATED TOPICS

Defining a window object