Alternative to panels for options window

C

chris s.

I have an options window for an application, which has is pretty
standard in its layout - treeview on the left side, a set of panels
that are shown and hidden as each option is selected from the
treeview.

I was wondering if there's a more modular way of doing this, instead
of having all the panels. Is it possible to 'embed' a form inside
another form, via the Parent property, to avoid having all the logic
and layout code in just one form file, which is currently in many
1000s of lines of code, making it easier to manage?

thanks,
chris
...
 
H

Herfried K. Wagner [MVP]

* (e-mail address removed) (chris s.) scripsit:
I have an options window for an application, which has is pretty
standard in its layout - treeview on the left side, a set of panels
that are shown and hidden as each option is selected from the
treeview.

I was wondering if there's a more modular way of doing this, instead
of having all the panels. Is it possible to 'embed' a form inside
another form, via the Parent property, to avoid having all the logic
and layout code in just one form file, which is currently in many
1000s of lines of code, making it easier to manage?

Keyword: UserControl.
 
C

c small

I had in mind Delphi's frame control, but I suppose user controls will
do the job too, thanks.
 
J

Jacob Grass [MVP]

c said:
I had in mind Delphi's frame control, but I suppose user controls will
do the job too, thanks.

In addition to Herfried's suggestion, you can display a form inside of a
container by setting the TopLevel property of the form to false and adding
it to the containers controls collection.
 

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