delphi - How do I use a specific font in a message box? -
how use specific font name , size in delphi 7's procedure, below :
procedure tform1.infoclick(sender: tobject); begin showmessage( '- lorem ipsum dolor sit amet.'+chr(10)+ '- lorem ipsum dolor sit amet.'+chr(10)+ '- lorem ipsum dolor sit amet.' ); end;
in dialogs
unit there function createmessagedialog: tform
used in messagedlg
function create message form. can use customization before form showing:
procedure tform5.button1click(sender: tobject); var i: integer; begin createmessagedialog('- lorem ipsum dolor sit amet.', mtinformation, [mbok], mbok) try // sets font whole form including buttons { font.name := 'times new roman'; font.size := 12; } // sets font label(s) := 0 controlcount - 1 if controls[i] tlabel controls[i] tlabel begin font.name := 'times new roman'; font.size := 12; end; showmodal; free; end; end;
Comments
Post a Comment