Search code examples
python-3.xgtk

up/down arrow adjustments in a spinbutton


How do I get an up/down arrow adjustmnet like in this image instead of the +/- adjustments. I didn't see anything the the spinbutton documentation addressing this.


Solution

  • You image is old school GTK (probably from GTK2). If you look at the widgets gallery from GTK3 and GTK4, you will see that the spin button has changed looks.

    Looking at the different options in Glade, I found that GtkSpinButton inherits from GtkOrientable. You can set orientation to be either horizontal or vertical. I tried both options in Glade and neither gives the result you are looking for.

    Vertical

    Vertical

    Horizontal

    Horizontal

    In both cases, you have those -/+ you want to get rid of.

    So to answer your question, sadly : no.