Help needed in OOP....I think......

L

ljh

Just learning......so please be gentle....

This is the idea (wrong as it may be).......

I'd like to code an app that has a treeview for a navigation element that
opens panels (to it's right) based on which element in the treeview is
selected. (Think Outlook - but single panes to the right instead of the
usual double pane.)

Thing is.....I want to be able to easily upgrade my "panels" when the user
requests changes and I want to be able to encapsulate "panel" specific code
into easily changed "panel" objects.

User controls are not really desired (personal quirk of mine - I think user
controls should be as easy to code VISUALLY as panels RIGHT ON THE FORMS -
they aren't and it bugs the hell out of me).

What would be the best way to have panel-like objects (froms would even be
nice) that I could place next to my treeview navigation control AND easily
change the panel-like objects by updating a file or two?

Thanks for your help!
 
T

Tasos Vogiatzoglou

Panel derived classes I thing would do the job ... Then you can pass
the derived panel object to a method that accepts Panel objects.
 
C

Chris Dunaway

You can use a form. Have your treeview on the left, and a single
"content" panel on the right. Then create a form for each set of
content you want to display.

Then when a node in the treeview is clicked, instantiate the Form, set
it's parent property to the Panel, and its TopLevel property to false.

Then call .Show. It will appear inside the panel.

You can also use a UserControl in this same fashion.

Chris
 

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