Re: Gtk_Adjustment question
- From: Owen Taylor <owt1 cornell edu>
- To: briam cats ucsc edu
- Cc: gtk-list redhat com
- Subject: Re: Gtk_Adjustment question
- Date: 11 Mar 1998 16:22:26 -0500
briam@cats.ucsc.edu writes:
> Does anyone know a good way to make a Gtk_Scale snap to some range of
> vaules? I've got some Gtk_HScale's that I would like to represent only
> integer values, but I can't seem to find an easy way to do it. Setting
> the step_increment of the Gtk_Adjustment associated with the scale seems
> to only affect the value on key presses. Mouse drags seem to be hardcoded
> to a resolution of 0.1. Any ideas?
In GTK (not gtk--), use
gtk_scale_set_digits (scale, 0)
The scale won't physically snap to the positions, but the values
displayed and returned will be integers.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]