GaugeClearColorRanges method (WinStudio scripts)

Applies To

IWSFormComponent interface

Definition

This method clears all color ranges from a gauge component.

Syntax

gauge.GaugeClearColorRanges( )

Remarks

This method can be helpful when you want to add or replace color ranges on a gauge component. Use this method to clear existing color ranges before adding the new ones.

Example

In this example, the GaugeClearColorRanges method is being used to make sure that existing color ranges are removed from the gauge before three new ones are drawn.

This example is given in Visual Basic.

gauge.GaugeClearColorRanges()
Dim r1 As ColorRange
Dim r2 As ColorRange
Dim r3 As ColorRange

r1.MinValue = 0
r1.MaxValue = 20
r1.Code = "0000FF"
gauge.GaugeAddColorRange(r1)

r2.MinValue = 21
r2.MaxValue = 60
r2.Code = "00FF00"
gauge.GaugeAddColorRange(r2)

r3.MinValue = 61
r3.MaxValue = 100
r3.Code = "FF0000"
gauge.GaugeAddColorRange(r3)