in reply to How to keep two checkbuttons in sync
Checkbutton manpage says:
Name: offValue
Class: Value
Switch: -offvalue
Specifies value to store in the button's associated variable
whenever this button is deselected. Defaults to ``0''.
Name: onValue
Class: Value
Switch: -onvalue
Specifies value to store in the button's associated variable
whenever this button is selected. Defaults to ``1''.
As said by Anonymous monk, just link it to same variable and you are done:
$t->Checkbutton(-text => 'Top',-variable => \$m)->pack(-side => 'left' +)})->pack();
|
---|
In Section
Seekers of Perl Wisdom