Perl-Sensitive Sunglasses | |
PerlMonks |
How Can My Perl/Tk Program use a Defined Font for All Widgets?by ozboomer (Friar) |
on Dec 09, 2018 at 04:21 UTC ( [id://1226992]=perlquestion: print w/replies, xml ) | Need Help?? |
ozboomer has asked for the wisdom of the Perl Monks concerning the following question: Something of a silly question, I fear... The code:
I can assign a different font from the standard 'system defined' type through the command line invocation, viz:- c:\> perl prg.pl -font "sans 12" ...and the window and its child widgets will all have the "sans 12" font (unless it's explicitly changed). However, it appears that if I want to do that same thing within the program itself, I have to do it explicitly on every widget, which seems redundant and annoying. Is there a defined/accepted/working way to do things 'globally' within the program? I've tried a couple of ways to apply a font to the Main Window (see in the code) and they don't seem to work. I've tried checking on-line, in the Monastery, the O'Reilly books and some various examples of code... and I can't find anything that will do what the command line approach does. This example is using ActiveState Perl v5.20.2 under Windows 8 32-bit. I'd greatly appreciate any clues. Thanks.
Back to
Seekers of Perl Wisdom
|
|