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

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -