To work with FontDialog
Step 1
If you wish to work with FrontDialog, first you need to add the Button and OpenDialog in the Form. The Button1 properties is Name: Set Font, Caption: Font.
Example:
Step 2
Next, you have to double click the Font button and it will display a Code Explore window. Later, enter the programming inside it.
Step 3
Program:
procedure TForm1.SetFontClick(Sender: TObject);
begin
FontDialog1.Font:=Memo1.Font;
if FontDialog1.Execute then
Memo1.Font:=FontDialog1.Font;
end;
end.
No comments:
Post a Comment