Panel AutoScroll
I'm having trouble restoring a panel's auto scroll position after resizing
some of its contained controls.
To store the current scroll position, I make a copy of the panel's auto scroll
position as follows:
oAutoScrollPosition = New System.Drawing.Point(m_panPanel.AutoScrollPosition .X,
m_panPanel.AutoScrollPosition.Y)
Then to restore after resizing the contained controls, I do this:
m_panPanel.AutoScrollPosition = oAutoScrollPosition
Problem is that this code has no effect. The scroll position is not restored.
Any ideas?
|