Scrollbars

lothos123452000

Newcomer
Joined
Dec 20, 2006
Messages
19
I am having a problem I have an image inside a panel that is set to AutoScroll so when the image is to large I get my scrollbars. The problem is when I click off the the app on to something else and then click back on it the scroll bars pop back up to the top where they started. This is a visual basic.net application. Any help offered is greatly appreciated
 
I think this bug may be a "feature." I've found many complaints about this behavior when searching google and MSDN, but the best answer I could find was "that's just how it works."
 
I don't know if there is a good workaround. You could try to hack your own. You can get and set the scroll position of a scrollable container, so you might be able to monitor the position and correct it when the undesired scrolling occurs, but you will almost certainly see some undesirable flicker.

There is another "feature" that you might run into when working with this, too. When you read the autoscroll position I believe you will get a pair of positive coordinates: the position of the viewport (top-left corner). When you set the autoscroll position, for no particular reason, the coordinate values should be negative: the offset of the controls' positions. Confused?
 
Back
Top