[quoted text, click to view] "Paul E Collins" <find_my_real_address@CL4.org> wrote in message
news:D6udnSaKb5EKjOfZnZ2dnUVZ8s6dnZ2d@bt.com...
> I'm writing an application whose main window consists of a particular
> UserControl that I have placed inside a docked Panel so that it will fill
> the whole window. The panel also has the AutoScroll property set so that
> the user can scroll if the inner control is larger than the window.
>
> Various dialogue boxes (displayed with Form.ShowDialog(this)) are
> available for setting properties, etc., and I've noticed that when a
> dialogue box is closed, the panel immediately reverts back to its top
> left-hand corner, forgetting where the user had scrolled.
>
> I can probably work around this by saving and restoring the scroll
> position, but is this a known bug or some feature of the Panel that I'm
> overlooking? It's definitely not my code.
Not sure if it's the same problem, but I've noticed that if the user scrolls
a form/panel so that the active control is not fully visible then when the
form regains focus after losing it (whether because another form is shown,
or because the user switches away to another application), the form/panel
scrolls to make the active control visible. Unfortunately I can't find any
simple way to prevent this.
Chris Jobson