Gauge

The Gauge control displays a numerical value using a speedometer style indicator. Its value is typically set by commands received from a connected device. You can attach up to four labels to the gauge which can be used to display units and status information. The first label can display the current gauge value as a number. Parts of the gauge scale can be marked using colored bands to indicate target or out-of-range values on the scale.

The gauge value is a floating point number.

Example Gauge Controls

Examples of the Gauges that can be created

Arduino Library Functions

The gauge supports the following Arduino library functions.
SetNumber(ControlName, Value)
GetValue(ControlName, PropertyName)
HideControl(ControlName)
ShowControl(ControlName)
SetBackColor(ControlName,Color)
SetGaugeLabel(ControlName, LabelIndex, LabelText)

Properties

Design-time properties for the Gauge control
NameDescription
MinValueThe minimum value shown on the gauge scale
MaxValueThe maximum value shown on the gauge scale
ScaleLinesMajorStepValueThe interval between numbered major-ticks on the scale
ScaleLinesMinorTicksThe number of unnumbered ticks between numbered major-ticks on the scale
ScaleNumbersFormatWhen true, the gauge automatically resizes to fit the control rectangle
ArcStartThe angle where the scale begins. Relative to an analog clock, 0 would be at 3 o’clock; 90 would be at 6 o’clock; 180 would be at 9 o’clock and 270 would be at 12 o’clock.
ArcSweepThe length of the scale arc, in degrees. 180° is half a circle; 270° is three-quarters of a circle
GaugeAutoScaleWhen true, the gauge automatically resizes to fit the control rectangle
DisplayValueOnLabelWhen true, the gauges current value is displayed on the first label
GaugeLabelsA collection of labels attached to the gauge
GaugeRangesA collection of colored bands attached to the scale

Use the ellipsis control (…) on the GaugeLabels property to add, remove and edit the labels attached to the gauge. Each label is positioned relative to the center of the gauge. The first label can show the current gauge value when the gauge control’s DisplayValueOnLabel is true.

Editing the Gauge Label collection

Add, remove and edit labels using the GaugeLabel collection editor.

Use the ellipsis control(…) on the GaugeRanges property to add, remove and edit the colored range bars attached to the gauge scale. Each band includes a Color property and Start and End properties which set the portion of the scale that is colored.

gauge range collection editor

Add, remove and edit colored scale bands using the gauge range collection editor

Label1Read/writestringGets/sets the text displayed on label 1 (if present)Label2Read/writestringGets/sets the text displayed on label 2 (if present)Label3Read/writestringGets/sets the text displayed on label 3 (if present)

Run-time Properties for the Gauge control
NameAccessTypeDescription
NameRead onlystringThe name of the control
ValueRead/writefloatThe current value
Label0Read/writestringGets/sets the text displayed on label 0 (if present)
Run-time properties common to most controls
PropertyAccessTypeDescription
VisibleRead/writeboolHide/show the control
EnabledRead/writeboolEnable/disable the control. When a control is disabled it is visible but shown grayed out and you can't interact with it.
ForeColorRead/writestringAdjust the foreground color
BackColorRead/writestringAdjust the background color

Start typing and press Enter to search