I'm trying to specify a font in a messageBox, but I can't figure out how to do this (or if it's even possible on Windows).
zentara posted some code here Re: How to get error/info/warning icons in perl /tk which appears to set a font, but it will not run on my machine. When I run zentara's code, I get this error
Tk::Error: bad option "-background": must be -default, -icon, -message +, -parent, -title, or -type at C:/Perl/site/lib/Tk.pm line 318.
I'm using Windows XP with ActiveState Perl 5.8.8 and I'm using Tk 804.028
Here is my simplified code which works...use strict; use warnings; use Tk; my $mw=new MainWindow; my $arial_font = $mw->fontCreate('normal_font', -family => "Arial Unicode MS", -size => "15", # point ); my $mess .= "\nAre these two customers the same?"; my $response = $mw -> messageBox( # -font => 'normal_font', -title => "Duplicate customer codes detec +ted", -message => $mess, -type => 'yesno'); MainLoop;
But when I take the # off the -font line, I get this error...
bad option "-font": must be -default, -icon, -message, -parent, -title +, or -type at C:/Perl/site/lib/Tk.pm line 318.
Is it possible that the Tk in ActiveState Perl does not accept a -font variable for a messageBox while the Unix version does? Thank you very much for any suggestions.
In reply to Can't specify font in messageBox by Theo_124
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |