How can i create a stand alone panel?

E

Elp

Hi,

I've built a Window Form application which main form contains only a Tab
control. Each tab contains a different functionality of the application so
the class representing the main form is growing bigger and bigger as
everything has to be put in this class.

I would like to split this big class into several smaller classes, each one
containing only one functionality of my app (ie, each class would represent
the content of one tab of my current main form). I though i could create
several classes that would extend the Panel class. Then, for each of those
classes, put on this panel all the controls that are at the moment in the
tabs of my main form. The idea being that when i'd have to create my main
form, i would just have to instanciate all of those custom panels classes
and put each one of them in the right tab of the main Form. This way, the
class containing the main form would be very small as it would just contain
a Form and a Tab control. The content of the tab would be placed in other
classes.

My problem is that when i create a new class that extends Panel, the Visual
Studio Window Form designer doesn't allow me to add controls to the panel
and place them wherever i want on the panel. Is there a way to achieve what
i want to do? Maybe by using a different approach?

Thanks
 
E

Elp

Elp said:
My problem is that when i create a new class that extends Panel, the Visual
Studio Window Form designer doesn't allow me to add controls to the panel
and place them wherever i want on the panel. Is there a way to achieve what
i want to do? Maybe by using a different approach?

Nervermind, found it. The User control is just about that.
 

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