"AutoScroll event" in Panel

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.
 
D

dgk

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)
 
T

Tom Bianchi

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top