Strange Scrollbar Issue

Frank D. Engel, Jr. fde101 at fjrhome.net
Sat Nov 18 09:42:16 EST 2006


1. File -> New Mainstack
2. Drag Little Arrows control onto card
3. Right-click object -> Properties Inspector
4. endValue := 511
5. lineInc := 1
6. Right-click object -> Edit Script
7. Enter handlers:

on scrollbarInc pos
   put pos
end scrollbarInc

on scrollbarDec pos
   put pos
end scrollbarDec

8. Apply

9. Click on little arrows, *nothing* happens as a result (except the  
hilite/unhilite of the arrows)

10. Add handler:

on scrollbarDrag pos
   put pos
end scrollbarDrag

11. Apply

12. Repeat step 9, now "0" is placed into the message box no matter  
which button I press

13. Remove scrollbarInc and scrollbarDec handlers

14. Apply

15. Repeat step 12, same results

16. Change endValue to 512

17. Repeat step 13, now the value in the message box can be changed  
to either 0 or 1.

18. Change endValue to 513

19. Repeat step 17, now 0, 1, and 2 are possible to obtain

and so on...


20. Replace scrollbarDrag handler with scrollbarInc and scrollbarDec  
handlers (originals from above in message)

21. Apply

22. Repeat of step 9, with its results - absolutely no change to  
message box (I even did a "put empty", and the value in the message  
box is not changing).



This recipe was constructed under 2.7.1, but it is essentially the  
exact behavior I was seeing under other versions of 2.7.x...



Searching bugzilla revealed the solution in the form of bug 2180:

the thumbSize of the scrollbar was 511.



23. set the thumbSize of scrollbar "Scrollbar" to 0

24. Repeat step 22 - same results, no change to message box

25. Repeat steps 10, 13, 14

26. Repeat step 9, same results as from step 9.

27. set the thumbSize of scrollbar "Scrollbar" to 1

28. Repeat step 9, same results...?

29. Checked properties, apparently setting the thumbSize to 0 sets  
the lineInc to 0 as well.

30. set lineInc back to 1

31. Repeat step 9, results are now correct

32. Set the endValue to 511, and can only go to 510

33. Set the endValue to 512 (due to the thumbSize), now I have what I  
wanted!


I'm going to attach this recipe to bug 2180 as a "clarification".

Thank you!


On Nov 18, 2006, at 12:06 AM, J. Landman Gay wrote:

> Frank D. Engel, Jr. wrote:
>> I have a "Little Arrows" scrollbar I dragged out onto a card.
>> With Rev 2.7.1, 2.7.2, and 2.7.4, I am seeing this:
>> I want to be able to select over a range of 0 to 511, so I set  
>> startValue to 0, endValue to 511, and the lineInc to 1.
>> When I try to use the arrows, the thumbPosition stays at 0!
>
> Try checking the scrollbarInc and scrollbarDec messages, which  
> carry a position parameter. The thumbposition doesn't really change  
> on tiny scrollbars. I think that's because the length of the  
> scrollbar has to be bigger than the size of the thumb before it  
> changes.
>
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list