Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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 -/+.

share|improve this answer
    
Thanks again, Sam! Testing... –  espectalll123 Jun 24 '12 at 11:54
    
Working! Thanks <) –  espectalll123 Jun 24 '12 at 12:05
    
P.S.: Why then it worked before? :/ –  espectalll123 Jun 24 '12 at 12:05
add comment
  • 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.

share|improve this answer
    
I already did that before having the bug. Thanks anyway! –  espectalll123 May 11 '13 at 18:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.