"AutoScroll event" in Panel

  • Thread starter Thread starter Tom Bianchi
  • Start date Start date
T

Tom Bianchi

Hi,

I have a Panel with the AutoScroll property set to True and many TextBoxes
into it, with only some of them positioned in the visible portion of the
panel.
Is there a Panel event that I can handle when I tab from textbox to textbox
and the panel has to scroll *automatically* from the current position to
bring the focused control into view ?
I know it is possible to use the Enter event of each textbox, but I must
execute a time expensive operation only when the automatic scroll happens.
The Scroll event seems to raise only when I use the scrollbar of the panel.

Thanks,
Tom.
 
Hi,

I have a Panel with the AutoScroll property set to True and many TextBoxes
into it, with only some of them positioned in the visible portion of the
panel.
Is there a Panel event that I can handle when I tab from textbox to textbox
and the panel has to scroll *automatically* from the current position to
bring the focused control into view ?
I know it is possible to use the Enter event of each textbox, but I must
execute a time expensive operation only when the automatic scroll happens.
The Scroll event seems to raise only when I use the scrollbar of the panel.

Thanks,
Tom.

I had a problem with adding a new usercontrol to a panel and scrolling
so that the whole usercontrol was visible. Seems like the same idea. I
did this when the form loads:

Panel1.SetAutoScrollMargin(5, 40)
 
I was too fast...

I tried with other forms and the problem is still there. I tried different
AutoScrollMargins but this doesn't help.

Any other ideas ?

Thanks,
Tom.
 
Back
Top