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
|
|
|