Page 1 of 1

PostPosted: Tue Oct 01, 2002 9:13 pm
by jims
May be the min, max, & page values make sense when a UIScroll object is attached to a UIField, but I'm attaching it to a scrollable gadget and based on the documentation I can not figure out what the values should be.

Can someone explain min, max, & page values better?


PostPosted: Tue Oct 01, 2002 10:08 pm
by design4use
The way I worked it was:

When the screen is initially set up:
- set the page of the scroller to the gadget height
- set the max of scroller which should be:
the height of the overall content - gadget height

When the screen changes position or is initially drawn
- set the scroll value to the the scroll offset of the gadget

When the scrollBar is touched:
- change the scroll offset of the gadget
I use ondone when the screen redraw takes a long time, if you're confident that your gadget will redraw quickly you can also use the onmove event of the scroller

hope this helps, d4u

PostPosted: Wed Oct 02, 2002 3:35 am
by jims

Exactly what I needed! :D


PostPosted: Sat Dec 21, 2002 5:54 pm
by jims
I was able to get the scroll bar for the gadget working perfectly except for one problem...

When the form is opened I set:
min = 0
max = 12
page = 11
value = 0

But when scroll bar is displayed it's scrolled to the bottom. I read back value and it's 0, then I scroll up and then it's visibly correct and the value is still 0, then I scroll down and the value is 1.

Why can't I get the initial display to look correct?


PostPosted: Sat Dec 21, 2002 6:51 pm
by jims
Nevermind... :oops: