tags:

views:

308

answers:

3

On C# winforms project, I have a small table, a filter box, an Add button and a Done button grouped together, and they all fit together within 250x250 pixels. I only need to show these elements to the user when they press a button. I figured this could be done using a pop up modal screen or by making room on the main screen until the user presses the Done button.

I know a disadvantage to modal screens is that they can cause problems for users when/if they lose track of the modal screen and then they think the program's not responding.

The disadvantage I see for using a dynamic main screen is that the reshaping interferes with the overall layout. But maybe I could find a way to overcome that problem.

I'm new to all of this, so I wanted to ask opinions here. Thanks.

+1  A: 

If you put them in a groupBox or FlowLayout panel possibly in the corner of the main screen and then set the visibility or even enabled on the entire control when they can or can't press the buttons works well.

disable until time they can edit.

groubB.enabled = true;

or

groubB.Visible = true;
sadboy
+1  A: 

Put them all on a panel (or, even better, a custom control), style it to look nice, and then only show the panel on button click.

Joel Coehoorn
Could you explain, or point me to an example of, having something like that on a custom control?
ChrisC
When you first add a custom control to a winforms project, you get a designer view that looks very much like a panel all by itself. The main advantage here is that it lets you group the controls and functionality of the space logically, without cluttering up your main form class.
Joel Coehoorn
+1  A: 

When the user clicks the button, could you disable all of the controls in the main form and then place the panel in the center of the main form, on top of the other controls? Maybe make the panel a little larger with some decoration around it for emphasis. Then, when the user clicks 'done,' dismiss the panel and re-enable all of the controls in the main form.

Jacob G
I should just bump everything else down to make room? Is it customary to do that? Are there any examples you could point me to?
ChrisC
No, do it on top of everything. Leave all of the other controls where they are and just place the panel on top. Add it to the controls collection of the form and then bring it to the front.
Jacob G