Unit Edit Control

Engineering Software Solutions

Legacy Code

ESSCo 1998-2008


  • Indication of required input data.
  • Limits checking.
  • Unit conversion.
  • Default values.
  • User validation.


The Unit Edit control can be set to display a red border when data input is required. In the example below the red border disappears when the user types in a value.

Values can be automatically tested against static limits. Both error and warning ranges can be set. Values outside the error limits are highlighted by a red border and those outside the warning range by a yellow border.

The unit of measure for a Unit Edit can be changed temporally whilst entering data. Alternatively the value can be converted to a different unit of measure. In the following example the unit of measure is changed from millimeters (mm) to inches (in) and the value converted.

Add unit conversion to your data entry windows. Values can be entered in any unit and stored in internally in any unit (although this is usually SI). Units can be typed in directly. For example, if the user has a value of 3 inches they can type '3 in' and this will automatically be converted to the current unit of measure (mm).

Default values can be set for a Unit Edit control. An empty edit box is automatically filled with the default value and displayed with a green border.

For more complex range checking or special processing user validation functions are provided. Having converted the input value and checked it against the static limits a user validation function is called. An error in the user validation function can be returned as a text string, which is automatically displayed. Here the sum of gas and liquid fractions are checked to ensure they don't exceed 100%.

Please contact ESSCo for further information.