Re: Slider Question [message #35577] |
Mon, 07 July 2003 14:34 |
Dave Greenwood
Messages: 33 Registered: October 2000
|
Member |
|
|
In a previous article, Karthikayan Balakrishnan <lovedale27@hotmail.NOSPAM.com.PLEASEREMOVETHIS> wrote:
> Hello All,
> Is there a way to make a slider go in intervals of 5 instead of 1.
> What I mean is this: when I use a slider in a widget, it displays in
> intervals of 1. Is there a way that allows me to start with say 5 and end
> with 100. The second allowable point on the slider is 10, the third 15, the
> fourth 20 and so on. I know that I can multiply by 5 in the event_pro
> procedure but that is not reflected in the slider's label. Any suggestions
> or recommendations? Thanks.
> Karthik.
I created my own variation on RSI's CW_FSLIDER and WIDGET_SLIDER which
allowed me to specify intervals (or specific allowable values) for a
slider. It's not an object and it's not well tested but you're welcome
to it if you're interested. (It requires 4 bit map files to provide
Windows-like arrowheads on X displays.)
Dave
--------------
Dave Greenwood Email: Greenwoodde@ORNL.GOV
Oak Ridge National Lab %STD-W-DISCLAIMER, I only speak for myself
|
|
|
Re: Slider Question [message #35579 is a reply to message #35577] |
Mon, 07 July 2003 13:56  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
David Fanning wrote:
> Ben Tupper writes:
>
>
>> I think there is a solution. Interestingly, you can get that behavior
>> by *not* clicking *on* the slider, but in the space to the left or right
>> of the slider postion. (I have to say, it also works by clicking on the
>> slider on my platform - but that is probably not the case on all
>> platforms) Here's the description of the SCROOL keyword to WIDGET_SLIDER.
>
>
> I think you mean SCROLL. SCROOL is something that comes
> out the side of a baby's mouth just as your mother-in-law
> bends over to kiss him. :-)
>
> If it comes down to an educational issue (I.e., train the
> user to click the proper place on the slider vs. train
> yourself to write a compound widget), I know which one
> I'm going to vote for as being most likely to succeed.
Hi David,
Oops! I have inherited the creative spelling job for the newsgroup
since Pavel is so scarce these days.
I agree with you about the object thing-a-ma-bob; even if I am just a
scrooling idiot.
Chers,
Been
PS Pavel! Come back!
|
|
|
Re: Slider Question [message #35580 is a reply to message #35579] |
Mon, 07 July 2003 13:42  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ben Tupper writes:
> I think there is a solution. Interestingly, you can get that behavior
> by *not* clicking *on* the slider, but in the space to the left or right
> of the slider postion. (I have to say, it also works by clicking on the
> slider on my platform - but that is probably not the case on all
> platforms) Here's the description of the SCROOL keyword to WIDGET_SLIDER.
I think you mean SCROLL. SCROOL is something that comes
out the side of a baby's mouth just as your mother-in-law
bends over to kiss him. :-)
If it comes down to an educational issue (I.e., train the
user to click the proper place on the slider vs. train
yourself to write a compound widget), I know which one
I'm going to vote for as being most likely to succeed.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Slider Question [message #35581 is a reply to message #35580] |
Mon, 07 July 2003 13:14  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
Paul van Delst wrote:
> David Fanning wrote:
>
>> Karthikayan Balakrishnan writes:
>>
>>
>>> Is there a way to make a slider go in intervals of 5 instead of 1.
>>> What I mean is this: when I use a slider in a widget, it displays in
>>> intervals of 1. Is there a way that allows me to start with say 5 and end
>>> with 100. The second allowable point on the slider is 10, the third 15, the
>>> fourth 20 and so on. I know that I can multiply by 5 in the event_pro
>>> procedure but that is not reflected in the slider's label. Any suggestions
>>> or recommendations?
>>
>> This is exactly why God made objects. (Well, one
>> of the *many* reasons, but certainly one of the
>> most practical.) Write yourself a little compound
>> widget/object that sets it's own label in units
>> of 5.
>
>
> My preference would be for RSI^H^H^HGod to have included a SET_SLIDER_INCREMENT keyword to
> WIDGET_CONTROL. Then one wouldn't have to write *any* new software.
>
> Now that's productivity :o)
Hi,
I think there is a solution. Interestingly, you can get that behavior
by *not* clicking *on* the slider, but in the space to the left or right
of the slider postion. (I have to say, it also works by clicking on the
slider on my platform - but that is probably not the case on all
platforms) Here's the description of the SCROOL keyword to WIDGET_SLIDER.
Set the SCROLL keyword to an integer value specifying the number of
integer units the scroll bar should move when the user clicks the left
mouse button inside the slider area (Motif) or on the slider arrows
(Windows), but not on the slider itself. The default on both platforms
is 0.1 x (MAXIMUM - MINIMUM), which is 10% of the slider range.
Ben
|
|
|
Re: Slider Question [message #35582 is a reply to message #35581] |
Mon, 07 July 2003 12:48  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
David Fanning wrote:
>
> Karthikayan Balakrishnan writes:
>
>> Is there a way to make a slider go in intervals of 5 instead of 1.
>> What I mean is this: when I use a slider in a widget, it displays in
>> intervals of 1. Is there a way that allows me to start with say 5 and end
>> with 100. The second allowable point on the slider is 10, the third 15, the
>> fourth 20 and so on. I know that I can multiply by 5 in the event_pro
>> procedure but that is not reflected in the slider's label. Any suggestions
>> or recommendations?
>
> This is exactly why God made objects. (Well, one
> of the *many* reasons, but certainly one of the
> most practical.) Write yourself a little compound
> widget/object that sets it's own label in units
> of 5.
My preference would be for RSI^H^H^HGod to have included a SET_SLIDER_INCREMENT keyword to
WIDGET_CONTROL. Then one wouldn't have to write *any* new software.
Now that's productivity :o)
paulv
--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
Ph: (301)763-8000 x7748
Fax:(301)763-8545
|
|
|
Re: Slider Question [message #35583 is a reply to message #35582] |
Mon, 07 July 2003 12:43  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Karthikayan Balakrishnan writes:
> Is there a way to make a slider go in intervals of 5 instead of 1.
> What I mean is this: when I use a slider in a widget, it displays in
> intervals of 1. Is there a way that allows me to start with say 5 and end
> with 100. The second allowable point on the slider is 10, the third 15, the
> fourth 20 and so on. I know that I can multiply by 5 in the event_pro
> procedure but that is not reflected in the slider's label. Any suggestions
> or recommendations?
This is exactly why God made objects. (Well, one
of the *many* reasons, but certainly one of the
most practical.) Write yourself a little compound
widget/object that sets it's own label in units
of 5. You could use a program like FSC_Inputfield
as a rough example:
http://www.dfanning.com/programs/fsc_inputfield.pro
Be careful, though. Once you see how powerful objects
are, and how easy to write, things will never be the
same and your employer will expect even bigger things
from you. :-(
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|