[sugar] Query regarding gtk.Adjustment

Arjun Sarwal arjun at laptop.org
Wed Sep 12 23:53:31 EDT 2007


Hi ,

I need to make my gtk.HScale take up discrete values - 30,50,70. For the
associated gtk.Adjustment, what should my parameters ( step_incr, page_incr,
page_size) be ?
I tried a few different combinations but none seemed to have worked.

Code snippet :
self.adjustmentf = gtk.Adjustment(70, 30, 70 ,20, 20, 0.0)
self.adjustmentf.connect("value_changed", self.cb_page_sizef,
self.adjustmentf)
self._freq_range = gtk.HScale(self.adjustmentf)
self._freq_range.set_draw_value(False)
self._freq_range.set_update_policy(gtk.UPDATE_CONTINUOUS)
self._freq_range.set_size_request(120,15)


Somebody suggested for me to use gtk_set_scale_digits or something, but i
couldn't find any documentation on that.


thanks,
Arjun

-- 
Arjun Sarwal ( arjun at laptop.org )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/sugar/attachments/20070913/944534f4/attachment.htm 


More information about the Sugar mailing list