Hi,

I am trying to create a UserControl that behaves like the Options screen in the visual studio 2008 IDE (and many other programs).

Basically instead of Tabs listing the 'subjects', you have a list to the left side which can contain the subject titles and/or images (a listview). Then on the right there is some room for panels (let's call them Pages) which get hidden and unhidden whenever required. These pages would contain the 'options controls' (like checkboxes, textboxes, comboboxes etc..).


Now I'm looking for a smart way to make the user of my usercontrol able to add these controls graphically. Because the Pages (panels) get added via code (otherwise you would still have to do most of the work yourself which would kind of defeat the point of my control) you cannot simply drag the required controls on those pages in the designer.

The ideal way would be to make something where the user can select "Add Page" and a blank options page would pop up (much like the VS Form designer) allowing him to put whatever controls on it they like.

I realize that this is probably way too advanced or even impossible so now I'm looking for a new way to do this.


Does anyone have any ideas?

One idea I had is to present the user with a new blank Form on which he can put his controls, then after visual studio creates the required 'Designer.vb' file (in which the exact location and properties of the controls are stored) I 'copy/paste' this designer code to my panel code. So basically you transfer the controls from the Form designer to the panel (via code) and then the form can be deleted again...
Again I doubt this is possible but you never know...