ISpeedometerScales.Count

Syntax

Count: Integer;

Description

The Count property determines the number of speedometer scales.

Comments

The speedometer contains one scale by default. Change this property to change the number of scales displayed in the speedometer.

Example

Executing the example requires a form with the Button1 button and the SpeedometerBox component named SpeedometerBox1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

s: ISpeedometer;

v: ISpeedometerView;

ScaleView, ScaleView1: ISpeedometerScaleView;

Begin

s := SpeedometerBox1.Speedometer;

v := s.View;

s.BeginUpdate;

s.Scales.Count := 2;

v.ScaleViews.Count := 2;

ScaleView := v.ScaleViews.Item(0);

ScaleView1 := v.ScaleViews.Item(1);

//The first design

ScaleView.StartAngle := 0;

ScaleView.DeltaAngle := 180;

//The second design

ScaleView1.FontColor := GxColor.FromName("Green");

ScaleView1.TextPlacement := SpeedometerTextPlacementType.OutsideRotated;

s.EndUpdate;

End Sub Button1OnClick;

After executing the example, on clicking the button, two speedometers are displayed in the SpeedometerBox1 component. Each speedometer has its own formatting.

See also:

ISpeedometerScales