Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 830  / 2 Years ago, thu, september 22, 2022, 1:01:01

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


More From » python

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


[#37338] Friday, September 23, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
calronze

Total Points: 0
Total Questions: 110
Total Answers: 112

Location: Belarus
Member since Thu, Aug 11, 2022
2 Years ago
calronze questions
Sun, Jan 9, 22, 13:41, 2 Years ago
Wed, Feb 15, 23, 01:41, 1 Year ago
Sat, Jul 23, 22, 21:03, 2 Years ago
Sat, Feb 5, 22, 01:57, 2 Years ago
;