Skip to main content

TcxCustomRadioGroup.Buttons Property

Provides access to the radio group items as the standalone radio buttons.

Declaration

property Buttons[Index: Integer]: TcxCustomRadioGroupButton read;

Property Value

Type
TcxCustomRadioGroupButton

Remarks

The Buttons property enables you to access the radio group items as the standalone radio buttons. The accessed button is specified by its zero-based index via the Index parameter. If the Index parameter value is negative or exceeds the last available index, an exception is raised.

The following code demonstrates how to highlight the selected radio group item with the bold font style. The OnChange event is handled for this purpose.

procedure TForm1.cxRadioGroup1PropertiesChange(Sender: TObject);
var I: Integer;
begin
  for I := 0 to cxRadioGroup1.Properties.Items.Count - 1 do
  begin
    if (I = cxRadioGroup1.ItemIndex) then
      cxRadioGroup1.Buttons[I].Font.Style := [fsBold]
    else
      cxRadioGroup1.Buttons[I].Font.Style := [];
  end;
end;
See Also