Is there a way to resize UserControls along with parent TabPane ?
MORE INFO
I have n number of controls one after an other, each control should be 100px height and width as much as parent control allows.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use the
DockandAnchorproperties of theControlclass on your UserControl to define the location and docking inside the parent control. The following link shows how the different settings work by some sample images (although for a TableLayoutPanel, but you will get a good overview):Anchor and Dock Child Controls in a TableLayoutPanel Control
Edit: For your example, set the preferred size and position of the child control with the designer. Then go to the layout section in the property window and set the
Anchorproperty toLeftandRight. This will change the child control’s width when you resize the parent control.