TCustomRadioGroup.ItemIndex property
The ordinal position in Items for the selected radio button in the group.
Declaration
property ItemIndex: Integer read GetItemIndex write SetItemIndex default - 1;Description
ItemIndex is an
Integer property with the ordinal
position for the selected radio button in the group. It refers to the
position in
Items with the caption for the radio button. The
default value for the property is
-1, and indicates that a radio
button is not selected for the group.
ItemIndex must be in the range -1..Items.Count-1. An
Exception is raised with the message in rsIndexOutOfBounds if an invalid
value is used.
When the value for the property is changed, the OnClick event handler is signalled (when assigned). In addition, the OnSelectionChanged is signalled (when assigned). Both events occur even if the Handle has not been allocated in the widgetset class. This is Delphi compatible.
Use the OnItemEnter and OnItemExit event handlers to perform actions when the focus or selection for a radio button is changed, as opposed to a change in the properties for the group control.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
