← Back to Index

TFlexFMXAdvancedRadioButton

Enhanced radio button with custom styling, colors, and Bootstrap integration.

Key Properties

Text: string
Radio button label text.
IsChecked: Boolean
Whether radio button is selected.
GroupName: string
Radio button group (only one per group can be checked).
CheckColor: TAlphaColor
Color of the checked indicator.
CircleColor: TAlphaColor
Radio button circle outline color.
TextColor: TAlphaColor
Label text color.
ButtonStyle: TRadioStyle
rsDefault (circle), rsButton (button appearance).
Size: Single
Radio button circle size.

CSS Classes

Usage Examples

Radio Button Group

// Create radio group
RadioButton1.Text := 'Option 1';
RadioButton1.GroupName := 'MyGroup';
RadioButton1.IsChecked := True;

RadioButton2.Text := 'Option 2';
RadioButton2.GroupName := 'MyGroup';

RadioButton3.Text := 'Option 3';
RadioButton3.GroupName := 'MyGroup';

Custom Colors

RadioButton1.CheckColor := TAlphaColors.Green;
RadioButton1.CircleColor := TAlphaColors.Darkgray;
RadioButton1.TextColor := TAlphaColors.Black;

Button Style

RadioButton1.ButtonStyle := rsButton;
RadioButton1.FlexFMXCSS.Text := 'btn-primary';
RadioButton1.Width := 120;

Get Selected Value

function GetSelectedOption: string;
begin
  if RadioButton1.IsChecked then
    Result := 'Option1'
  else if RadioButton2.IsChecked then
    Result := 'Option2'
  else if RadioButton3.IsChecked then
    Result := 'Option3';
end;

Events

Notes

← Back to Index