11-10-2008 11:35 AM
11-10-2008 11:36 AM
11-10-2008 01:13 PM
With respect to the individual behaviors:
lavalava wrote:
but if you scroll toward the bottom of the page you'll notice it's bouncing up and down.
This is happening because at the end you're trying to set the scroll position beyond the last scroll position. When your loop comes around again it sets the scroll position back to the end, which causes the jerkiness.
Another problem is if you hold down the scroll and drag, it's very jerky. Is there any way to smoothen this problem?
This is caused by the fact that you are trying to update the scroll position even though nothing is happening. When a user drags the scroll bar they're not using the scroll wheel, but you're constantly setting the scroll position programmatically, so your program is fighting what the user is trying to do.
Other comments:
11-10-2008 02:44 PM
you can just ignore the shift register, you're right it can be done without. I got this example off this site and they had it so...
how do I check when it gets to the last line?
11-10-2008 03:13 PM
Perhaps it was a wiring translation error. Where is the original example? If anything, you should be casing out the update of the scroll position so that it only happens if the "Scrolling" value is non-zero. That would remove the "jerkyness" when the user uses the scroll thumb.
As for the number of lines, that's dependent on the size of the control, the font that you're using, and the amount of text that you have in the control, so it's something that you would need to calculate on your own. And no, I'm not aware of any sample code that does this, but that doesn't mean it doesn't exist. Try a search - it might turn something up.
11-10-2008 03:18 PM - edited 11-10-2008 03:21 PM
I downloaded this example off sine.ni.com, sorry I couldn't find the link. It was downloaded a while back and it's something I have been using until today my users expressed unhappiness
I'm not sure if I can cast out for non-zero value because the scroll number is either +/-, + is to go up and - is go down. Try running it and put a probe on the scoll number line you'll see (the brown line). Any other idea?
11-10-2008 03:41 PM - edited 11-10-2008 03:41 PM
lavalava wrote:I'm not sure if I can cast out for non-zero value because the scroll number is either +/-, + is to go up and - is go down. Try running it and put a probe on the scoll number line you'll see (the brown line). Any other idea?
Why not?
