Gauges for WinForms | ComponentOne
Working with Gauges for WinForms / Gauge Pointers
In This Topic
    Gauge Pointers
    In This Topic

    Gauges may have one or several pointers. Pointer appears as a figure whole position depends on the current value. Each gauge object has the main pointer (C1GaugeBase.Pointer) and the collection of other pointers (C1GaugeBase.MorePointers).

    Each pointer has the Value property. The lower and upper bounds for the pointer value is specified by the C1GaugeBase.Minimum and C1GaugeBase.Maximum property of the owner gauge. If it doesn't belong to the given interval you may use the C1GaugePointer.ValueOffset and C1GaugePointer.ValueFactor properties to coerce the source value, for example, change the unit of measure.

    When the Value property changes the pointer redraws at the new location immediately, by default. The SweepTime property allows smooth moving the pointer. It sets the amount of time that is taken to move the pointer from Minimum to Maximum.

    There are a few properties that affect pointer's appearance. You can choose among the predefined pointer shapes, create a custom shape, or display a custom image for the pointer. The C1GaugeBase.Offset, C1GaugeBase.Length, and C1GaugeBase.Width properties specify the offset, length, and width of the pointer in logical coordinates at the scale's minimum position. It is possible that the offset and/or length of the pointer will be changed linearly from minimum to maximum values. So there are also the C1GaugeBase.Offset2 and C1GaugeBase.Length2 properties that specify the offset and length at the scale's maximum value.

    Pointer values can be bound to a data source. The C1GaugeBase.DataSource and C1GaugeBase.DataMember properties allow easy binding to the main pointer. There is also the special C1GaugeBase.BoundValue property. This is the same as Value (i.e., the value of the main pointer) but it is of type Object and returns DBNull.Value instead of Double.NaN if the pointer is "switched off". The next properties: C1GaugeBase.MorePointersValue_0, C1GaugeBase.MorePointersValue_1, C1GaugeBase.MorePointersValue_2, C1GaugeBase.MorePointersValue_3 allow binding to the first four elements of the C1GaugeBase.MorePointers collection.

    See Also