470,631 Members | 1,640 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,631 developers. It's quick & easy.

"AutoScroll event" in Panel

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
3 2100
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
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
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.

Similar topics

4 posts views Thread by Lars Netzel | last post: by
2 posts views Thread by ZBINContact | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.