Hello,
I need to change the self.width_spin (gtk.SpinButton) value, but in some
cases I do not want the changed event to fire. How do I set the value?
This is my code:
adj = gtk.Adjustment(orig_width, 1, orig_width, 1, 50, 0)
self.width_spin = gtk.SpinButton(adj, climb_rate=0.0, digits=0)
self.width_spin.show()
self.width_spin.set_numeric(True)
self.width_spin.connect(*"value-changed"*,
self.image_size_changed_callback, "width")
hbox1.pack_start(self.width_spin, False, False, 0)
This call will trigger the *"value-changed"* event so I want to avoid it.
self.width_spin.set_value(some_value)
gtk.SpinButton is derived from gtk.Entry, so if I could grab the entry
field from gtk.SpinButton so it may be possible to write:
entry.set_data("value", some_value)
Do you know how to do this right?
Am writing a filter/resize/and scale plugin in Python for my screendump
program http://bildr.no/view/291282. Screendump is written in GTK and c.
TIA
Osmo Antero (moma)
Oslo
_______________________________________________
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/