Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: How to keep two checkbuttons in sync

by gurpreetsingh13 (Scribe)
on Mar 28, 2013 at 03:29 UTC ( #1025840=note: print w/replies, xml ) Need Help??


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();

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1025840]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2016-12-10 17:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (164 votes). Check out past polls.