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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UserControl - Parent/Child creation

Status
Not open for further replies.

jayscot

MIS
Feb 2, 2001
25
US
I need to write a control that behaves much like the tab or toolbar control which allows the user to add to a collection of child controls at design time.

Both the Parent and child are usercontrols. I want the child-usercontrol to show in the designer like a tab or toolbar button would after adding a new one.

it looks like the bit of code that needs to be going in the windows forms section at design time is:

MyParentControl1.Controls.AddRange(New _
System.Windows.Forms.Control() {Me.MyChildControl1})

If i manually add this code all is well, but I don't want users to be forced to do this(hence my desire to have this control function like the toolbar or tab).


Thanks for any advice,

Jay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top