How to organize my Form to look tidy? RRS feed

  • Question

  • The question is: What can I do to make my Form tidy, organized and clean?

    I always have the same problem when I put a lots of controls in my Form: they are always overlapped (as in this image)

    For instance if I what to appear the button2 when I press the button1, and the button1 to disappear, and when I press the button2 the button1 to appear and the button2 to disappear (and so on and so forth with the other button), the Form looks messy, and it is very hard for me to work with all the controls that are one above the other.

    What can I do?

    I know that I can create, let's say, the button2 when I press the button1, etc. ; but I am not sure that this is the right way to solve this problem...

    Please help!

    Thursday, January 30, 2014 11:05 AM


All replies

  • Go to View ->  Other Windows and open Document Outline


    • Marked as answer by OVlad Thursday, January 30, 2014 5:00 PM
    Thursday, January 30, 2014 12:17 PM
  • Hello,

    When a user interface is designed there should never be overlapping controls, instead segment controls into containers such as a TabPage with several TabPages or place controls into Panel controls where you can set its auto scroll to true which allows for controls to fit off the visible canvas and a scrollbar will allow users to scroll to a specific control. There is also the idea of showing a modal child form for some controls that don't fit on the current screen.

    In regards to controls visible property changing to hide controls, this is not a good designer, users tend to dislike it when controls vanish.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

    Thursday, January 30, 2014 12:23 PM
  • I am referring to the Form that I see before Running the program, not the Form of the Program that was executed. I mean, the problem is what I see not what the user that uses my program sees. I just want to know what is the best way to use a lots of controls in a Form but without getting tangled and filling all your Form with them. 

    Thursday, January 30, 2014 12:40 PM
  • How the form looks - its Layout - is your responsibility.  There is no "Magic Button" that's going to do it all for you. 

    Use the Forms Designer to set the Anchor or Dock properties on each Control so that the move/ resize sensibly.  Use container controls - panels, tab controls, layout panels, etc. to group controls together. 

    Or use the Layout events/ OnLayout overrides to position things "by hand", setting Locations and Sizes yourself. 

    Regards, Phill W.

    Thursday, January 30, 2014 12:45 PM
  • Kevin wrote that in fact but like me not sure from your problem.

    However, The common way is to create user controls. Be aware that is not necessarily one control. It can be a complete screen on a panel which you add to the form and show and hide at the moment you want. 



    • Marked as answer by OVlad Thursday, January 30, 2014 4:58 PM
    Thursday, January 30, 2014 3:22 PM
  • ok........thank you...
    Thursday, January 30, 2014 5:00 PM