Here is my problem :
I want to use an Hscale to select an integer. This Hscale shares its Adjustment with a Spinbutton, so that when one of them is modified the other is automagically modified in the same way.
So actually there are two ways to select an integer : thanks to the HScale or thanks to the Spinbutton.
The Spinbutton works well, but I have the problem with the Hscale (hence this mail !) : it doesn't respect the step (which is equal to 1, as I want to select integers).
I mean the slider can be moved in a continuous way, whereas I would like it to move in a discrete way.
I've found two ways to solve my problem :
- the first one consists in having the value of the Hscale displayed, with its digits set to 0. But I'd prefer had the value displayed in the entry box of the Spinbutton...
- the second one consists in setting a callback for the 'value_changed' event, which get the current value of the Hscale and set it to nearest integer value. But it's not a very nice workaround to my mind...
So does anybody know a nicer way to solve my problem ?
By the way if someone knows a simple way to graduate a Hscale, I would be much interested too.
Thanks in advance !
--
Remi
_______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
