I've been going around in circles today trying to fathom which
contol I should use to provide a selection of one of four different options.
These are concerned with
Font Style - ie. Normal, Bold, Italic or Bold-Italic - You'l no doubt observe that they are exclusive and to that end I first attempted to use four separate
TCheckBoxes This got me into a right mess when I added
Event code.
My next trial was a
TCheckGroup set up as 4 columns since the ideal would be a single row rather than 4, but this gave me grief over the fact that I couldn't determine which
Index had been selected - LCL Help seemed to indicate that there was an 'Index' but the compiler disagrees.
Here is a snippet of code which fails to compile - and I'm sure is simply not the way to approach this problem but may give someone an insight into what I'd like to achieve.
procedure TTriangleSolution.Font_StyleClick(Sender: TObject);
var
I : byte;
begin
If Font_Style.Checked[0] := true then I := 0
else
If Font_Style.Checked[1] := true then I := 1
else
If Font_Style.Checked[2] := true then I := 2
else
If Font_Style.Checked[3] := true then I := 3;
case I of
0 : begin
end;
1 : begin
FontNames.Font.Style:=fsBold;
end;
2 : begin
FontNames.Font.Style:=fsItalic;
end;
3 : begin
FontNames.Font.Style.fsBold:=True;
FontNames.Font.Style.fsItalic:=True;
end;
end;
end;
FontNames is a TComboBox which has been populated with a list of potential Font Names. Once a selection has been made, I wish to display the name in the appropriate style.
The compiler throws an error on Line 17 but that's the least of my problems at the minute

Given that there surely ought to be a simple means by which I can select one of four options I'd appreciate the advice from the wealth of wisdom there is on this forum
