Re: Convenient way to derive the value from a scale?



    Michael> I'm trying to attach an event to whenever the GtkHScale widget
    Michael> is modified to update a value in another field.  I haven't
    Michael> found the correct event (obviously) and the only way I've found
    Michael> to do it so far is constantly check the adjustment value of the
    Michael> widget for a change....

Try connecting to the value-changed signal of the scale's adjustment
object.  In Python, it would look something like so:

    adj = gtk.GtkAdjustment(1200, 0, 10000, 1.0, 100.0, 0.0)
    slider = gtk.GtkHScale(adj)
    adj.connect("value-changed", slider_cb)

-- 
Skip Montanaro (skip pobox com)
http://www.mojam.com/
http://www.musi-cal.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]