Try to run the following and it proves that optionAdd does deliver the expected "scope":
use warnings; use strict; use Tk; use Tk::LabFrame; my $mw = new MainWindow ( ) ; $mw->optionAdd('*foo*font' => '-adobe-courier-plain-r-normal-*-30-*-*- +*-*-*-*'); $mw->optionAdd('*bar*font' => '-adobe-courier-bold-r-normal-*-30-*-*-* +-*-*-*'); $mw->optionAdd('*foo*foreground' => 'red'); $mw->optionAdd('*foo*background' => 'green'); $mw->optionAdd('*bar*foreground' => 'white'); $mw->optionAdd('*bar*background' => 'yellow'); my $frame = $mw->LabFrame(-label => 'Frame', Name => "foo")->pack; $frame->Label ( -text => 'foo', Name => "bar")->pack(-padx=>5, -pady=> +5) ; MainLoop();
In reply to Re: Tk and optionAdd's scope
by PeterPeiGuo
in thread Tk and optionAdd's scope
by eff_i_g
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |