SunView question: positioning parts of a slider
Mark Phillips
mbp at lakisis.umd.edu
Wed Feb 15 03:50:45 AEST 1989
Thanks for the slider info. As it turns out, I solved the problem some
time ago (the delay with submissions to Sun-Spots is really long!) by
setting PANEL_SHOW_VALUE to FALSE and using a separate message item, which
gets updated with every call to the slider's notify proc, to display the
slider's value. I set PANEL_NOTIFY_LEVEL to PANEL_ALL so the value gets
updated whenever the slider is moved.
This actually works very nicely, and I'm using it to implement a slider
which essentially is real-valued. Of course, internally, the slider's
value is really an integer, but I can display it in whatever format I
want, which in my case is 1/10 of the value. So my slider takes values
between 1.0 and 2.0.
> Incidentally, it is not hard to implement a slider yourself
> with a few message items containing the values and a pixrect that
> understands click and drag events.
Wouldn't it be nice if you could define new items like this, and
attributes for them (like a typedef), and then create and manipulate them
with panel_create_item, panel_set, etc, just like all the "built-in" item?
But then again, wouldn't a lot of things be nice...!!
--Mark
[[ The Sun-Spots delay varies. Notice that this particular message took 5
days including a weekend. I'm trying to keep it as small as possible (but
things tend to conspire against me). --wnl ]]
More information about the Comp.sys.sun
mailing list