Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GtkSpinButton disabled by default in Glade

I added GtkSpinButton to my dialog from Glade and it is disabled by default:

enter image description here

What should I do to make arrows enabled?

like image 351
umpirsky Avatar asked Jan 19 '23 02:01

umpirsky


1 Answers

You need to configure the GtkSpinButton with the Adjustment object as follows (example values):

adj = gtk.Adjustment(1, 1, 99, 1, 1, 1)
spinBtn = self.builder.get_object("spinbutton1")
spinBtn.configure(adj, 1, 0)
like image 187
Yan Yankowski Avatar answered Jan 28 '23 15:01

Yan Yankowski