[.net] Scrollbar issues

Started by
-1 comments, last by gellin 17 years, 7 months ago
So I have a control that is currently in a panel and that panel has scrollbars. I scroll up about 600 pixels or so from its default location. Then I try and move the control and in that event I set the control's parent to the form instead of the panel it is currently on. This causes my panels scrollbar to return back to its starting position and automatically move back down the 600 pixels I just scrolled. Does anyone have any idea why this would occur? I did it with a picture box before and changing the parent never caused a problem, but with this control (OpenGLWinFormsControl) it does. Any help would be appreciated. Thanks Edit: I found out that now if I scroll and then minimze or go to a different window and then go back to that one, the scrollbar moves back to its default location automatically like the example abovel. I'm still trying to track it down, but I have determined in this case that the scrollbar changes before the form_activated event handler gets hit. Edit2: Well I solved my problem, not how I would have liked to but it works perfectly now. I turned off AutoScroll and implemented my own Horizontal and Vertical scrollbars and no I don't have that problem anymore. [Edited by - gellin on August 22, 2006 4:36:41 PM]

This topic is closed to new replies.

Advertisement