Swapping controls in windows forms

  • Thread starter Thread starter Lloyd Taylor
  • Start date Start date
L

Lloyd Taylor

Hello,

Quite a simple one, however I don't know where to start.
In my form I have a treeview, splitter and some free space on the right of
my windows form.

Depending on which node in the tree is clicked I need to show different
things. i.e. either a list view, another form, text boxes etc...

Can anyone suggest the best way of achieving this?

Thanks in advance
 
The best option is to have a static Panel on the right that keeps your ordering
with respect to the splitter. Then you can add/remove docked items into the
Panel and they'll fill your right space.

These controls can be embedded in a UserControl (the best way so that they
are easily design). As for Forms, you really can't show those in the right side
region.
 
Back
Top