470,614 Members | 1,569 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

How to create a user control with scrollbars?

I need to create a table user control. The table will display many
cells so this control requires scrollbars should be displayed when some
cells cannot be displayed. At first, I draw the table on a UserControl,
and resized the UserControl to the exact size of table and placed it on
a Panel whose AutoScroll is true. So when the table(actually a
UserControl) gets bigger, the Panel displays scrollbars automaticaly,
this seemed fine.

But the problem is, I need to place controls like TextBox on some
cells. When the Panel's AutoScroll is set to true, if a TextBox gets
focused while some part of the TextBox is not in visible area , the
Panel automatically scrolls the table to display the whole TextBox.
This caused problems. The TextBox is not exactly displayed in the
location of the cell.

Anyways, that's why I'm trying to create a real scrollable table
control. I want to implement scrolling by myself. But I've never done
something like this before. So Is there any good articles or howtos I
can get started with? I need to know the basic concept of displaying
portion of an area of the entire visible area,. and update the portion
of area when user scrolls the scrollbar.

Thank you very much in advance!

Aug 19 '06 #1
0 1427

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dropstengel | last post: by
1 post views Thread by Gerben van Loon | last post: by
reply views Thread by msnews.microsoft.com | last post: by
reply views Thread by Kenneth H. Brannigan | last post: by
5 posts views Thread by Charlie Brown | last post: by
2 posts views Thread by jfolland | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.