> adj = gtk.GtkAdjustment(1,1,6,1,1,1)
> hsc = gtk.GtkHScale(adj)
>
>If I click in the trough, it increments or decrements by 1. However, if I
>drag the slider, it increments by 0.1. I only want it to take on integer
>values between 1 and 5 (inclusive). Is there a way to force the step
>increment to actually equal 1 as the GtkAdjustment reference documentation
>indicates?
i don't think it does this. the slider adjusts to "any" value in the
range. you need to quantize in the value_changed
handler before passing the value onto anyone else. also, you want 6 as
the 3rd argument, not 5, i think.
> Also, can I get it to only display values as integers ("1"
>instead of "1.0")?
this may do the trick:
gtk_hscale_set_digits (GTK_SCALE(hsc), 0);
or whatever its python equivalent is.
--p
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list