RAD Studio VCL Reference
TSpeedButton.GroupIndex Property

Allows speed buttons to work together as a group.

property GroupIndex: Integer;
__property int GroupIndex;

Set GroupIndex to determine how the button behaves when clicked.  

When GroupIndex is 0, the button behaves independently of all other buttons on the form. When the user clicks such a speed button, the button appears pressed (in its clicked state) and then returns to its normal up state when the user releases the mouse button. 

When GroupIndex is greater than 0, the button remains selected (in its down state) when clicked by the user. When the user clicks a selected button, it returns to the up state, unless AllowAllUp is false. Setting the GroupIndex property of a single speed button to a value greater than 0 causes the button to behave as a two-state button when AllowAllUp is true. 

Speed buttons with the same GroupIndex property value (other than 0), work together as a group. When the user clicks one of these buttons, it remains selected until the user clicks another speed button belonging to the same group. Speed buttons used in this way can present mutually exclusive choices to the user. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!