lundi 22 mai 2017

Working with Checkbox in Delphi

please give me advise, sir i'm new to delphi My problem is like below, so i want all the checkboxes Bold,Italic and Underline to work out if i checked all of them. Thanks.

I try searching similar problem from this site to help me but their question just to confusing..

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  if Checkbox1.Checked = True then
  Label1.Font.Style := [fsBold] else
  Label1.Font.Style := [];
end;

procedure TForm1.CheckBox2Click(Sender: TObject);
begin
  if Checkbox2.Checked = True then
  Label1.Font.Style := [fsItalic] else
  Label1.Font.Style := [];
end;

procedure TForm1.CheckBox3Click(Sender: TObject);
begin
  if Checkbox3.Checked = True then
  Label1.Font.Style := [fsUnderline] else
  Label1.Font.Style := [];
end;

end;




Aucun commentaire:

Enregistrer un commentaire