Multiple buttons to call same function in python Gtk -


i developing small application using gtk-python, in have 10 20 buttons, , when of them clicked, want value of button appended in text box have done far by

button1.connect("clicked",button_function) button2.connect("clicked",button_function) ... 

for functions. way of doing it? or there elegant way? , value of button specified

button1._value=#something ... 

can me?

in way, put button objects in list, call this,

for button in buttonslist:      button.connect("clicked",button_function) 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -