By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,742 Members | 1,327 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,742 IT Pros & Developers. It's quick & easy.

"AutoScroll event" in Panel

P: n/a
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.
Mar 30 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
dgk
On Thu, 30 Mar 2006 23:28:40 +0200, "Tom Bianchi" <a@b.c> wrote:
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)
Mar 31 '06 #2

P: n/a
Thank you very much dgk,

this solved the problem !
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)

Mar 31 '06 #3

P: n/a
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.
Mar 31 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.