slider unexpected behavior
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
slider unexpected behavior
Hi,
I have two scrollbar identical, scrB1, scrB2
Orientation : horizontal
Style : scale
Width = 100
Height = 42
Starvalue = 1
EndValue = 100
ShowValue : true
PageInc = 10
They have an unexpected behavior, i can't get some value with the slider
scrB1 jump 3
scrB2 jump 10
Best
Jean-Marc
I have two scrollbar identical, scrB1, scrB2
Orientation : horizontal
Style : scale
Width = 100
Height = 42
Starvalue = 1
EndValue = 100
ShowValue : true
PageInc = 10
They have an unexpected behavior, i can't get some value with the slider
scrB1 jump 3
scrB2 jump 10
Best
Jean-Marc
- Attachments
-
- SliderJumpValue.rev.zip
- (1 KiB) Downloaded 208 times
https://alternatic.ch
Re: slider unexpected behavior
Hi Jean-Marc,
sorry, I don't get it, what exactly is the problem?
sorry, I don't get it, what exactly is the problem?
Re: slider unexpected behavior
Hi Jean-Marc,
I think this is due to the fact that Rev internally does a floating point operation and you have a rounding error because the width of the scrollbar is the same as the endvalue. To see this effect you can putinto the scrollbar.
To change this behavior you will have to set the width to something bigger then 100. A width of 130 gets rid of this in my trials. Setting the thumbposition by script works for width of 100.
regards
Bernd
I think this is due to the fact that Rev internally does a floating point operation and you have a rounding error because the width of the scrollbar is the same as the endvalue. To see this effect you can put
Code: Select all
on scrollbarDrag
set the numberformat to ".###"
put the thumbposition of me + 0
end scrollbarDrag
To change this behavior you will have to set the width to something bigger then 100. A width of 130 gets rid of this in my trials. Setting the thumbposition by script works for width of 100.
regards
Bernd
Re: slider unexpected behavior
Jean-Marc,
if you look at the slider closely it turns out that at a width of 100 the actual width of the marks is smaller. As soon as you set the width of scrollbar to a width that equals 100 pixel for the marks then you get the correct behavior.
So the width of the scrollbar in the inspector is not the width of the "scrolling" line. No wonder there are "rounding errors".
regards
Bernd
if you look at the slider closely it turns out that at a width of 100 the actual width of the marks is smaller. As soon as you set the width of scrollbar to a width that equals 100 pixel for the marks then you get the correct behavior.
So the width of the scrollbar in the inspector is not the width of the "scrolling" line. No wonder there are "rounding errors".
regards
Bernd
Re: slider unexpected behavior
Klaus,
Bernd explane the trouble in his post
With a width 152 the slider work fine
Best
Jean-marc
Bernd explane the trouble in his post
With a width 152 the slider work fine
Best
Jean-marc
https://alternatic.ch
Re: slider unexpected behavior
Hi friends,
yep, got it now
yep, got it now

Re: slider unexpected behavior
Yes Klaus,
With the german staff i can go far
All the best
Jean-Marc
With the german staff i can go far
All the best
Jean-Marc
https://alternatic.ch