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

Adding scrollbars to a usercontrol, HOW?

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.