MFC => C# Problem, Dynamic Views

J

Jesper Odgaard

Hi,

I'm migrating a program to C# that I wrote using MFC. The
programs GUI was split vertically in two halfs with a
tree control to the left. Accordingly to the different
items that could be selected in this tree view, the right
side of the GUI showed different Formviews that was
replaced dynamically at runtime.
I would like to do the same thing in my C# version of the
program. However I cant figure out which controls could
do the job for me.

Please heeelp!
Jesper, Denmark.
 
N

Nicholas Paldino [.NET/C# MVP]

Jesper,

Well, you would probably want to start with the UserControl class as a
base, as it can host other controls and you will want to derive your own
custom controls from this class. Then, when the item in the tree view is
changed, you will want to dynamically add/remove the control on the
right-hand side using the Add and Remove methods on the Controls property
exposed by whatever Control you place on the right hand side.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top