Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show compulsory fields on a windows form

How should I show users which fields are compulsory in a windows forms application.

I have considered changing the label color or maybe the background color of the text box.

I use an error provider to show a red exclamation mark next to the field, however this is only visible after they have clicked the save button.

like image 627
Simon Avatar asked Oct 14 '08 00:10

Simon


People also ask

What is mandatory field in a form?

Many forms have fields that must be filled in by the user. One of the advantages of using mobile forms over paper or spreadsheets is that you can prevent the user from submitting the form until all of the mandatory information has been filled in.

How do I make a field mandatory in C#?

Are you asking for representing mandatory fields in C# winforms or displaying message while submitting the data. To mark field mandatory you can use color coding or astrick(*) after field name or change font of the field caption to mark those field mandatory.

How do I show text in Windows Forms?

Step 1: Create a windows form. Step 2: Drag the TextBox control from the ToolBox and Drop it on the windows form. You can place TextBox anywhere on the windows form according to your need. Step 3: After drag and drop you will go to the properties of the TextBox control to set the Text property of the TextBox.


3 Answers

  • Asterisk or icon to the side of control
  • Red border when required validation fails (when user tries to save)
  • Bold Labels
  • Different background color for required controls (perhaps only when user tries to save)
like image 178
Jason Jackson Avatar answered Sep 23 '22 18:09

Jason Jackson


Use the errorprovider extension control.

This places a red cross next to the control with a tooltip message.

like image 41
benPearce Avatar answered Sep 22 '22 18:09

benPearce


Yellow background would make it similar to many web forms. No idea whether there are any standards for Windows per se, though if there are I doubt they are widely used.

like image 34
Argalatyr Avatar answered Sep 20 '22 18:09

Argalatyr