469,963 Members | 2,044 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Adding scrollbars to a usercontrol, HOW?

Hi, this may sound silly but I want to have some scrollbars used by a
user-control that is resized. And what I don't want to do is, in the
user-control code, for example

Me.AutoScrollMinSize=new Size(200,200)

What this does is that when the user control is smaller than 200,
horizontal and/or vertical scrollbars automatically appear. I want my
scrollbars to appear somewhere else, not surrounding the usercontrol.
Actually I don't even want them to appear, they are already there - I
just want them used.

Is there a way in the usercontrol to specify the name of the scrollbar
to use? For example, if my scroll bar is somewhere else on the same
form as the usercontrol, and called VScroll1, can I tell the
usercontrol to use this scrollbar?

Thank you
Tony.
Nov 20 '05 #1
1 7354
Nak
> Is there a way in the usercontrol to specify the name of the scrollbar
to use? For example, if my scroll bar is somewhere else on the same
form as the usercontrol, and called VScroll1, can I tell the
usercontrol to use this scrollbar?


Hi,

Just draw 2 scroll bar controls onto your control where you would like
them placed. Reposition them in the resize event of the control. Add the
code necessary yourself, which shouldn't be hard depending on how you want
the scrolling to work.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Gerben van Loon | last post: by
reply views Thread by Jack Smash | last post: by
2 posts views Thread by felix | last post: by
reply views Thread by Sin Jeong-hun | last post: by
5 posts views Thread by Charlie Brown | last post: by
1 post views Thread by raylopez99 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.