I have a file which stores a list of enumerations with their associated values. The following is an illustration what the file looks like (rather than its actual contents):
Enumerated value Meaning (associated text)
0 Sunday
1 Monday
2 Tuesday
3 Wednesday
4 Thursday
5 Friday
6 Saturday
I am writing a C# program to allow users to look up between the enumerated values and their associated texts. In other words, they should be able to look up the text from a value, and vice versa.
I wonder what is the best way to design the user interface? I have several ideas:
- Have two text boxes. The user can fill in either of them and the other automatically populates as the user types. If the value is invalid, just leave the other text box blank.
- Have a text box for the user to fill in the side of the information they have, a radio button to specify what information they are filling in to the text box, an OK button which when pressed, updates a text label with the result or an error message.
- Same as 2, but do not have the OK button. Just update the text label as the user types (i.e. handling the Control.KeyPress event).
- Have two separate screens (one to search enumeration from text, the other to search text from enumeration) and the user can flip between them by a tab or a button. Have a text box for user input, an OK button and a text label to display the result or error message.
- Have two separate areas on the same screen. Each area has the same format as in 4.
I thought 2 is what I would expect from a GUI application, although it may be a bit slow and there is a problem of What to display if the user just typed "S" and pressed OK. Option 1 is messier but may be more interactive (displays the answer quicker).
Sorry if this is not strictly a programming question, but I think it is a UI design issue which comes up often enough. Does anybody know of any industrial standard best practices please?
Thank you very much.