5.8.2 Edit Text Fields

Many editable fields are handled in a way shown here using an example from the “Train Data” window, where you can change the “Look Ahead Time”.


When you move the mouse pointer over the field where the value is displayed and click on that field, the display changes as follows:


A label with yellow background tells you now what to do – the focus is on the text field and you can now enter a new value using your keyboard.


While you’re doing this, the system watches out for any incorrect input, and if there is, a second label is shown with the error text displayed in red. This check is performed after every keystroke. The message is displayed even if you could not have completed the input (e.g. a time input requires 3 or 4 digits so you get the error label when you started the input and have just typed in the first 1 or 2 digits).

When there is no error label displayed, you can hit <ENTER> to complete the input, and the display returns back to normal with the updated value.

If you want to back out, hit <ESC> key. You can always do this, e.g. if you feel you’re stuck with the input, since <ESC> or <ENTER> are the only way to get out of the input request.

Note, the two labels and the editable text field are actually part of a separate window, that is mostly transparent, anchored such that is it locked in the position where the base label is located. That’s why you cannot move the underlying window around. The two additional labels (request and error) are not constrained by the underlying window – they can stretch beyond the boundaries of the underlying window.

A more “traditional” way to ask for input is shown below (from the block speed list window, after clicking one field of the table there to change the speed limit), again when the field was just clicked, and after a typo.