in reply to Re^2: Can't specify font in messageBox
in thread Can't specify font in messageBox
I just tried changing the font for my test script using RefontTree to re-set the font on my whole program and it will not change the font in the messageBox.
This is very strange because the widget demo DOES use a different font in the messageBox that it displays, but I can't figure out how. The widget demo never CHANGES the font that it uses in the messageBox, but it is a larger bolder font than the one that I always get.
Here is my code that shows the ability to change the font for the whole rest of the program, but the messageBox is always the same
use strict; use warnings; use Tk; use Tk::FontDialog; my $mw=new MainWindow; $mw->Label(-text => "Test")->pack; $mw->Button(-text => "Another test")->pack; $mw->Button(-text => "Use Tk::FontDialog", -command => sub { my $font = $mw->FontDialog->Show; if (defined $font) { $mw->RefontTree(-font => $font); } })->pack; my $mess .= "\nAre these two customers the same?"; $mw->Button(-text => "Test messageBox", -command => sub { my $res = $mw -> messageBox( -title => "This is a test", -message => $mess, -type => 'yesno'); } )->pack; MainLoop;
Does anyone have any ideas here? Or what I could try?
I'd give up, except for the fact that I KNOW it can be done because the widget demo shows it!
Thank you for any tips or advice you might have for me
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Can't specify font in messageBox
by Sandy (Curate) on Apr 26, 2009 at 22:40 UTC | |
by Theo_124 (Novice) on Apr 27, 2009 at 14:35 UTC |