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.
Arduino Library Functions
The gauge supports the following Arduino library functions.
SetGaugeLabel(ControlName, LabelIndex, LabelText)
|MinValue||The minimum value shown on the gauge scale|
|MaxValue||The maximum value shown on the gauge scale|
|ScaleLinesMajorStepValue||The interval between numbered major-ticks on the scale|
|ScaleLinesMinorTicks||The number of unnumbered ticks between numbered major-ticks on the scale|
|ScaleNumbersFormat||When true, the gauge automatically resizes to fit the control rectangle|
|ArcStart||The 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.|
|ArcSweep||The length of the scale arc, in degrees. 180° is half a circle; 270° is three-quarters of a circle|
|GaugeAutoScale||When true, the gauge automatically resizes to fit the control rectangle|
|DisplayValueOnLabel||When true, the gauges current value is displayed on the first label|
|GaugeLabels||A collection of labels attached to the gauge|
|GaugeRanges||A 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.
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
End properties which set the portion of the scale that is colored.
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)
|Name||Read only||string||The name of the control|
|Value||Read/write||float||The current value|
|Label0||Read/write||string||Gets/sets the text displayed on label 0 (if present)|
This control also supports all the common run-time properties.