XForms: slider fine tuning weirdness

Trent Piepho (xyzzy@u.washington.edu)
Mon, 3 Nov 1997 18:04:52 -0800 (PST)

To subscribers of the xforms list from Trent Piepho <xyzzy@u.washington.edu> :

I saw in the manual that a slider can be controlled more accurately if you hold
down shift as you move it. This seems to act find of funny though.

I've include a small sample program that shows this. Try setting the slider
to a value of 3. It's almost impossible for me to do this. Also, try
moving the slider to the extreme left or right while holding down shift. It
will move up 47 and then stop, even though the upper bound is 64.

#include "forms.h"
int main(int argc, char *argv[])
{
FL_FORM *foo; FL_OBJECT *obj;

fl_initialize(&argc, argv, 0, 0, 0);
foo = fl_bgn_form(FL_FLAT_BOX, 320, 250);
obj = fl_add_valslider(FL_HOR_NICE_SLIDER,50,130,120,20,"");
fl_set_slider_precision(obj, 0);
fl_set_slider_bounds(obj,-64,64);
fl_set_slider_step(obj, 1.0);
fl_end_form();
fl_show_form(foo,FL_PLACE_CENTERFREE,FL_FULLBORDER,"foo");
for(;;) fl_do_forms();
}

|Gazing up to the breeze of the heavens \ on a quest, meaning, reason |
|came to be, how it begun \ all alone in the family of the sun |
|curiosity teasing everyone \ on our home, third stone from the sun. |
|Trent Piepho (xyzzy@u.washington.edu) -- Metallica |
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/