Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle a lot of controls on a Form?

I am wondering how to handle a Form with a lot of controls. Do you stuff all of the handling code into the Form? This is how I have been doing it, but my most recent project is getting out of hand because of all of the controls that I need to work with. I have menus, multiple toolbars, tabcontrols filled with controls, statusbar, ... you get the idea. I am thinking of using partial classes to split up things, but that's probably a bad idea. I just need some advice on what I should do.

like image 570
John_Sheares Avatar asked Dec 23 '22 00:12

John_Sheares


1 Answers

I would recommend using UserControls to break up your functionality. By moving independent pieces into UserControl instances, you can segregate your logic.

In addition, using an architectural pattern like MVC or MVP can help tremendously as an application gets larger.

like image 144
Reed Copsey Avatar answered Jan 16 '23 19:01

Reed Copsey