ComponentOne Gauges for WinForms
Gauges for WinForms Task-Based Help / Adding Captions
In This Topic
    Adding Captions
    In This Topic

    It’s common to display text on a gauge, such as units of measure or labels. You can add any number of captions through the FaceShapes or CoverShapes collections.

    1. Click the ellipsis button next to the Gauges property in the Properties window. The C1Gauge.Gauges Collection Editor dialog box opens.
    2. Click the ellipsis button next to FaceShapes. The FaceShapes Collection Editor opens.
    3. Select C1GaugeCaption from the Add drop-down button.
    4. Set the Text property of the caption to "C1Gauge." You will notice the caption appears behind the Cap. If you added the caption to the CoverShapes collection, it would display on top.
    5. Set the Color property to White and the FontSize to 10.
    6. If you don’t want the caption in the middle of the gauge, move it down by setting the CenterPointY property. By default, this is 0.5, which means the caption appears 50% of the way down the gauge from the top. Set CenterPointY to 0.8 to move it down.
      Set Caption

    No matter what size the gauge is scaled at, this Caption will always appear at that expected location. Here, I’ve also set the FontSize to 10 and the FontColor to White.

    See Also