Board index » delphi » RadioButton with different font for the selected item

RadioButton with different font for the selected item

Hi,
Did somebody can help me ?.
I would like to have a RadioGroup where it will be possible to change the
font (color & style) of the selected Item.
Somebody have an Idea how to do this stupid Think ?.

Many,Many thank's to All.

Paolo Parenti
goita...@iol.it

 

Re:RadioButton with different font for the selected item


Paolo:

Something like the following in the OnClick handler for the TRadioGroup:

procedure TForm1.RadioGroup1Click(Sender: TObject);
var
  b: integer;
begin
  with RadioGroup1 do begin
    if ItemIndex <> -1 then begin
      TRadioButton(Controls[ItemIndex]).Font.Color := clRed;

      for b := 0 to ControlCount - 1 do
        if b <> ItemIndex then
          TRadioButton(Controls[b]).Font.Color := Font.Color;
          // This is the RadioGroups font color---^
    end;
  end;
end;

--
Regards
Ralph (TeamB)
Herrsching, Germany

Quote
Parenti wrote in message <01bd49f0$280903a0$0542d2c3@parenti>...

|Hi,
|Did somebody can help me ?.
|I would like to have a RadioGroup where it will be possible to change the
|font (color & style) of the selected Item.
|Somebody have an Idea how to do this stupid Think ?.
|
|Many,Many thank's to All.
|
|Paolo Parenti
|goita...@iol.it

Other Threads