GroupName: String
The GroupName property sets name for a group of radio buttons.
Setting one group name for several buttons means to group them. Only one radio button in the group can be selected at the same time.
To execute the example, the HTML page must contain the ToolBar component named toolBar and the ImageList component that refers to the ui-icons_222222_256x240.png file containing a collection of icons (see Example of Creating the ToolBar Component).
//Create radio buttons that are members of the same group named radioGroup
var lbtn = new PP.Ui.ToolBarButton({
ToolTip: "Align left",
RowIndex: 0,
ColumnIndex: 12,
Parent: toolBar,
GroupName: "radioGroup"
});
var rbtn = new PP.Ui.ToolBarButton({
ToolTip: "Align right",
RowIndex: 0,
ColumnIndex: 10,
Parent: toolBar,
GroupName: "radioGroup"
});
var cbtn = new PP.Ui.ToolBarButton({
ToolTip: "Align center",
RowIndex: 0,
ColumnIndex: 11,
Parent: toolBar,
GroupName: "radioGroup"
});
//Add radio buttons on the panel:
toolBar.addItem(lbtn);
toolBar.addItem(cbtn);
toolBar.addItem(rbtn);
After executing this example radio buttons are placed in the toolbar:
Only one radio button from a group can be selected:
See also: