ISpeedometerScales.Count

Syntax

Count: Integer;

Description

The Count property determines the number of speedometer scales.

Comments

By default there is one scale in speedometer. It is necessary to change the given property if user wants to change the number of scales displayed in the speedometer.

Example

Executing this 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;

If the user presses the button after executing this example, two speedometers are displayed in the SpeedometerBox1 component. Its own design is assigned for each speedometer.

See also:

ISpeedometerScales