TMSFNCRadioButton
The TMSFNCRadioButton is a component that is working like a TRadioButton, but it also introduces other capabilities such as HTML formatting compatible text, widget position and more. With the TMSFNCRadioButton.Checked property, you can set and retrieve the checked state both at designtime and programmatically. If there are multiple TMSFNCRadioButtons on the form, only one of them can be in a checked state at a time if they share the same parent. You also have the possibility to set GroupNames for the radio buttons that are sharing the same parent.
procedure TForm2.FormCreate(Sender: TObject);
var
rb: TTMSFNCRadioButton;
I, t: Integer;
begin
t := 50;
for I := 0 to 3 do
begin
rb := TTMSFNCRadioButton.Create(Self);
rb.Parent := Self;
rb.GroupName := '1';
rb.Left := 50;
rb.Top := t;
t := t + 30;
end;
for I := 0 to 3 do
begin
rb := TTMSFNCRadioButton.Create(Self);
rb.Parent := Self;
rb.GroupName := '2';
rb.Left := 50;
rb.Top := t;
t := t + 30;
end;
end;
Setting the widget position and custom widget works just like in TMSFNCCheckBox.