Count: Double;
The Count property determines the number of speedometer scales visual styles.
One visual style of speedometer scales exists in the component by default. If there is more than one scale in the component, specific design can be configured for each scale. The number of design styles that will be created, should be indicated in this property. The visual style of the first scale is used for all scales for which the individual visual style was not created.
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: