The TGButtonGroup widget organizes TGButton widgets in a group.
A button group widget makes it easier to deal with groups of buttons.
A button in a button group is associated with a unique identifier.
The button group emits a Clicked() signal with this identifier when
the button is clicked. Thus, a button group is an ideal solution
when you have several similar buttons and want to connect all their
Clicked() signals, for example, to one slot.
An exclusive button group switches off all toggle buttons except
the one that was clicked. A button group is by default non-exclusive.
All radio buttons that are inserted, will be mutually exclusive even
if the button group is non-exclusive.
There are two ways of using a button group:
The button group is a parent widget of a number of buttons,
i.e. the button group is the parent argument in the button
constructor. The buttons are assigned identifiers 1, 2, 3 etc.
in the order they are created or you can specify button id in
the button constructor. A TGButtonGroup can display a frame and
a title because it inherits from TGGroupFrame.
Example:
vertical frame without border and title
TGVButtonGroup *bg = new TGVButtonGroup(main_frame);
create text button with id=1
TGTextButton *button1 = new TGTextButton(bg,"some text");
create another text button with id=2
TGTextButton *button2 = new TGTextButton(bg,"another text");
map all buttons
bg->Show();
NOTE: there is no need to call AddFrame() since the buttons are
automatically added with a default layout hint to their parent,
i.e. the buttongroup. To override the default layout hints use the
SetLayoutHints() method.
ButtonGroup Signals:
Pressed(Int_t id) --> is emitted when a button in the group is
pressed down. The id argument is the
button's identifier.
Released(Int_t id) --> is emitted when a button in the group is
released. The id argument is the button's
identifier.
Clicked(Int_t id) --> is emitted when a button in the group is
clicked. The id argument is the button's
identifier.
The TGHButtonGroup widget organizes TGButton widgets in a group
with one horizontal row. TGHButtonGroup is a convenience class that
offers a thin layer on top of TGButtonGroup. It inherits from
TGButtonGroup.
The TGVButtonGroup widget organizes TGButton widgets in a group
with one vertical column. TGVButtonGroup is a convenience class that
offers a thin layer on top of TGButtonGroup. It inherits from
TGButtonGroup.

Sets the button group to be exclusive if enable is kTRUE,
or to be non-exclusive if enable is kFALSE.
An exclusive button group switches off all other toggle buttons when
one is switched on. This is ideal for groups of radio-buttons
A non-exclusive group allow many buttons to be switched on at the same
time. The default setting is kFALSE.

If enable is kTRUE, this button group will treat radio buttons as
mutually exclusive, and other buttons according to IsExclusive().
This function is called automatically whenever a TGRadioButton
is inserted, so you should normally never have to call it.

Inserts a button with the identifier id into the button group.
Returns the button identifier.
It is not necessary to manually insert buttons that have this button
group as their parent widget. An exception is when you want custom
identifiers instead of the default 1, 2, 3 etc.
The button is assigned the identifier id or an automatically
generated identifier. It works as follows: If id > 0, this
identifier is assigned. If id == -1 (default), the identifier is
equal to the number of buttons in the group+1. If id is any other
negative integer, for instance -2, a unique identifier (negative
integer <= -2) is generated.
Inserting several buttons with id = -1 assigns the identifiers 1,
2, 3, etc.