Widget Slider Values [message #12327] |
Sun, 12 July 1998 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Darran Edmundson (dEdmundson@Bigfoot.com) writes:
> P.S. While I have the attention of an IDL guru. I just "hand-coded"
> my first slider widget. Is it really necessary to add labels manually
> in order to see the slider value. It's late here but I don't see
> a keyword or compound widget that will do the job and I'm about to create
> a widget_label ...
No, it is NEVER necessary to hand-code widget slider values, as
far as I know. I've certainly never done it. I have seen this
kind of thing happen once in one of my IDL courses, however.
I can't remember exactly what caused it, but it may have been
the user setting the YSIZE keyword in such a way that the
values of the slider could not fit into the allocated screen
space. In general, you might have to set the XSIZE of a
horizontal slider, but you should leave the YSIZE alone.
(And visa versa for a vertical slider.)
Cheers,
David
P.S. As a general rule, I try to avoid the XSIZE and YSIZE
keywords and "size" my programs by the appropriate
application of row and column bases. This makes for much
more portable code. But occasionally the odd XSIZE or YSIZE
keyword is required. Since this tends to restrict program
portability, I often allow the value of this keyword to
be set by the user with a keyword (e.g., Slider_XSize). Thus,
my program regains some of the missing portability by
means of configuration keywords.
---
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: Widget Slider Values [message #12356 is a reply to message #12327] |
Thu, 16 July 1998 00:00  |
mgs
Messages: 144 Registered: March 1995
|
Senior Member |
|
|
In article <MPG.101283109280766989807@news.frii.com>, davidf@dfanning.com
(David Fanning) wrote:
> Darran Edmundson (dEdmundson@Bigfoot.com) writes:
>
>> P.S. While I have the attention of an IDL guru. I just "hand-coded"
>> my first slider widget. Is it really necessary to add labels manually
>> in order to see the slider value. It's late here but I don't see
>> a keyword or compound widget that will do the job and I'm about to create
>> a widget_label ...
>
> No, it is NEVER necessary to hand-code widget slider values, as
> far as I know. I've certainly never done it. I have seen this
> kind of thing happen once in one of my IDL courses, however.
I've had to do it a couple times. Once for a reversed scale (2000 to 1),
and another for a (what's the word for 1, 10, 100, 1000) scale. But
generally, you shouldn't have to hand-label a widget_slider.
--
Mike Schienle Interactive Visuals
mgs@la.znet.com http://la.znet.com/~mgs/
|
|
|