Range and Color

Range of values displayed by the widget, with optional rim color. Multiple sub-ranges can also be specified. By default, the range is 0:100.

Attribute

Value

Physical Property Name Range
Property Type range
Dynamic? Yes
Default value 100

 

Value

Description

MinValue

Whole number from 0 through 65534

MaxValue

Whole number from 0 through 65534

Description

This is a dynamic property that can be set in ProcScript via the field's ValRep.

You can specify a range or sub-ranges in the following ways:

  • Enter a pair of values, separated by a colon (:) to specify a range From:To, for the extremes of the scale or of a sub-range. For each pair of From:To values, you can specify a color from the standard color code table.

    If you specify several pairs of such values, the overall range of the entire scale is determined by the least of the From values and the greatest of the To values.

  • Create a Uniface list in ProcScript and assign it to the field's $valrep. See Setting in ProcScript.
  • If you enter a mix of single values and pairs of values, the overall range of the entire scale is determined by the smallest of the single values and From values, and the greatest of the single values and To values.

For each range or sub-range you define, you can specify a Uniface index color to use as the color of the rim. The color used is the foreground color. For example, to display rim colors, green, yellow and red, specify the color index numbers 16, 48, and 32.

Meter with Rim Colors Associated with Sub-Ranges

Rim colors for ranges in Meter widget

Setting in ProcScript

You can use ProcScript to set the ranges and assign color values.

variables
   string vRanges
endvariables

putitem ranges , -1 , "0:30=16"    ; green
putitem ranges , -1 , "31:50=24"   ; cyan
putitem ranges , -1 , "51:100=8"   ; blue
putitem ranges , -1 , "101:200=32" ; red
valrep(FLD1) = vRanges
		

Applies To

umeter (Meter)