Click here to Skip to main content
15,908,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I made an empty usercontrolSCR. In it i added a scrollbar + code for mouse wheel to move the scroll and all is working well. But in Form 1, when I add a large textbox in this usercontrolSCR, it does not auto hide the textbox if I move the textbox outside the border of the usercontrolSCR. Like a Panel does it.
What is the code (if it is one), to 'contain' other controls inside this usercontrolSCR ?
Thank you.

What I have tried:

edited>>>
I am talking in designView, not in code.
In code, i make this:
userControlPanel1.Controls.Add(tb1);
tb1.Location = new Point(0, usercontrolSCR.Height - 30);//to test it
and is doing the thing i want.
Posted
Updated 25-Jan-19 23:38pm
v2

1 solution

 
Share this answer
 
Comments
_Q12_ 26-Jan-19 6:34am    
Now, that's a SUPERB answer !
Exactly what i wanted.
Thank you very much!
OriginalGriff 26-Jan-19 6:42am    
You're welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900