I have a form that contains a panel with controls. The form has autoscroll set to true. If I resize the form at run time from the bottom so scroll bars appear, and I drag the scroll bar to the top so I see the top of the panel in the form, then if I click on the title bar of the form, the panel jumps up so the scroll bar is close to the bottom of the form (but not all the way down). It seems to be a focus thing. If I clidk on another form, and then click on the form with the scrollbars, the panel jumps when the scrolled form gets focus. I can also position the scroll bar at the bottom, and if I move focus to another form, and then back, the scrollbar jumps up; again not all the way to the top.
The only thing unique about the forms that show this problem is that they have a "widget" that can be dragged left and right in a panel on the screen. So I am listening to a mouse down event on the widget, but the dialog/form has no event listeners.
Can someone suggest why this is happening? I have not anchored the panel explicitly, but it acts as if it is anchored to the top/left (this is how it behaves), and docking is not set. What can I change to keep the panel from jumping when the form gets focus?
thanks
Bryan
The only thing unique about the forms that show this problem is that they have a "widget" that can be dragged left and right in a panel on the screen. So I am listening to a mouse down event on the widget, but the dialog/form has no event listeners.
Can someone suggest why this is happening? I have not anchored the panel explicitly, but it acts as if it is anchored to the top/left (this is how it behaves), and docking is not set. What can I change to keep the panel from jumping when the form gets focus?
thanks
Bryan
Last edited: