I've done some spin buttons with Glade for my Python/GTK3 app, but I don't know how to set things like default, lower or higher value. How can I do it?
Using the following things for development:
- Python 2.7.3
- GTK 3
- Glade 3.12.1
1) I need to change things from script, as I need to set default value and maximum value as a variable;
2) I saw the PyGTK documentation before, it's not working for GTK3;
3) please don't direct me to the GTK3 docummentation… I can't understand it 😛
Best Answer
In Glade:
You can also change those values from code, the class refrence can be found here: gtk.SpinButton.
Edit: You can get the maximum and minimum values using the following code:
where min is minimum value, max is maximum value, and spinbutton is the spin button widget. You can also set it using the following: