Adding scrollbars to a usercontrol, HOW?

  • Thread starter Thread starter Antony
  • Start date Start date
A

Antony

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.
 
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
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
 
Back
Top