Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a control with a Panel on it.

Status
Not open for further replies.

Jay1b

Programmer
Apr 27, 2004
15
GB
Hi

I'm trying to create a user control with a panel component on it. I can create a control which inherits from a panel, this allows me to drag on other controls during design time. But if i set them to fill they consume the whole control. Where I want sections of the control which the user can and cant drag other components onto at design time.

Thanks.
 
Yes, if you set everything to fill it will do that. The last control on there will fill the whole area. I don't know what it is actually called in vb.net, but I call it order of precedence. Every control is given a default order on whatever you place it on (in this case a panel) from the first one to the last one placed. If you tell the first one to fill then it will fill, but the last one will fill as well hiding everything. Lets say you were placing two panels on there what you would want to do is tell the first one to dock left, right, up, or down and the second to fill. If you are doing 50 controls the last one is the one that has to fill because the other 49 have precedence over it and will do what they need to do first.

-I hate Microsoft!
-Forever and always forward.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top