1

So, I have an important problem related with spin buttons in Python/GTK3. I'm trying to create a spin button in my project, Virtuam, and it seems to work... but with a bug which blocks the +/- toogles.

Without clicking

Clicking

Also, strangely, I can manually change the spin box value... :/

With the value changed

I've installed it in a virtual machine, and it haves the same problem.

Running from Lubuntu in a VM

It worked well before, and if I try to remove the source and download a commit which worked, I still have problems. What should I do? Is it a GTK bug, or it's my fault? In the last case, what's wrong: the script (vui.py) or the interface (assistant.glade)?

You can download the latest commit at lp:virtuam/trunk

2 Answers 2

1

You have to set the increment. You can do that by using the set_increments() method of the spinbutton:

spinbutton.set_increments(1.00, 5.00)

That will set it to increment by 1 when left clicking the -/+ and by 5 when middle clicking the -/+.

1
  • P.S.: Why then it worked before? :/
    – Xerz
    Jun 24, 2012 at 12:05
0
  • Click the spin button and go to its properties menu on the right
  • There you can see a property called adjustment just below spin button's name. spin Button Properties

  • To the right of the adjustments there is a button with "...", click it

  • On the dialogue box that appear click new
  • A new item adjustments would have appeared on the widgets enter image description here

  • Click it and its properties you can adjust step increment, max value, min value etc. etc.

1
  • I already did that before having the bug. Thanks anyway!
    – Xerz
    May 11, 2013 at 18:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .