Disabling Some Autoscroll Functionality
Hi,
I've got a large collection of forms inside of a Panel, and the panel has Autoscroll = true. When a panel has Autoscroll on, the default behavior is for the "viewing area" of the scroller to make the upper-left corner of a control visisble if it gets focus at a time when that control is outside the scroller's client area.
Now I want to make it so that there is an auto scroll bar but it does not scroll to a component that gets the focus. I have found that this scrolling is annoying to the user rather than helpful in this case. Thanks if anyone can help.
BTW: Most of the time I'm dealing w/ a vertical scroller.
Followup; Stopping Flickers
It turns out that the scroll-to-focus scrolling does not actually generate any messages, however that example BMJ gave was helpful since it showed me that the AutoScrollPosition property returns negative values for some twisted reason.
I have heard it suggested that one can make derived controls and set their ConstrolStyle.Selectable to false prevents them from getting focus but I just tried this on some tab controls and they definitely still get focus.
So now I've got a hack with a custom window that can "snap back" to a store scroll position when needed. However, there's a flicker. Is there a way to somehow suspend the drawing of a control and its child components during the scroll?