Ask Your Question

couple sliders on checkbox click

asked 2011-11-18 05:10:59 +0200

Xtux gravatar image

Consider the following example:

def _(a=slider(0,10,1,default=2),b=slider(0,10,1,default=5),equal=checkbox(False)):

Is it possible, that after clicking on the checkbox, the position of the second slider becomes equal to that of the first slider and that, as long as the checkbox is checked, both sliders are coupled, i.e. if you change one, the other one changes by the same value.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-11-18 05:22:58 +0200

Jason Grout gravatar image

There's not an easy way to lock the sliders, though you could easily ignore one of the sliders if the checkbox was checked.

def _(a=slider(0,10,1,default=2),b=slider(0,10,1,default=5),equal=checkbox(False)):
    if equal:
    print a, b
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-11-18 05:10:59 +0200

Seen: 290 times

Last updated: Nov 18 '11