|
This is same as previous example. But uses more dynamic system to
illustrate how to change Font Style using CheckBox on click
event.

Download this example
Setup
CheckBoxes on click events as :
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
If CheckBox1.Checked Then
Panel1.Font.Style:=Panel1.Font.Style+[fsBold]
Else
Panel1.Font.Style:=Panel1.Font.Style-[fsBold];
end;
procedure TForm1.CheckBox2Click(Sender: TObject);
begin
if CheckBox2.Checked Then
Panel1.Font.Style:=Panel1.Font.Style+[fsItalic]
Else
Panel1.Font.Style:=Panel1.Font.Style-[fsItalic];
end;
procedure TForm1.CheckBox3Click(Sender: TObject);
begin
if CheckBox3.Checked Then
Panel1.Font.Style:=Panel1.Font.Style+[fsUnderline]
Else
Panel1.Font.Style:=Panel1.Font.Style-[fsUnderline];
end;
DOWNLOAD this example
Click
here
to download this complete example for Delphi 6. (File size 4 KB)

|