ISpeedometerArrowViews.Count

Syntax

Count: Integer;

Description

The Count property determines the number of speedometer arrows visual styles.

Comments

One visual style of speedometer scales arrows exists in the component by default. If more than one arrow is used for the scale, it is possible to configure its own design for each arrow. It is necessary to indicate in the given property the number of visual styles that are created. The visual style of the first arrow is used for all arrows for which the individual visual style was not created.

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;

Arrows: ISpeedometerArrows;

ArrowsViews: ISpeedometerArrowViews;

ScaleView: ISpeedometerScaleView;

ArrowView, ArrowView1: ISpeedometerArrowView;

Begin

s := SpeedometerBox1.Speedometer;

v := s.View;

s.BeginUpdate;

Arrows := s.Scales.Item(0).Arrows;

Arrows.Count := 2;

Arrows.Item(0).Value := 50;

Arrows.Item(0).Value := 125;

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

ArrowsViews := ScaleView.ArrowViews;

ArrowsViews.Count := 2;

ArrowView := ArrowsViews.Item(0);

ArrowView1 := ArrowsViews.Item(1);

//The first arrow

ArrowView.Length := 0.8;

ArrowView.Shape := SpeedometerArrowShapes.Triangle;

ArrowView.Width := 0.15;

//The second arrow

ArrowView1.Length := 0.5;

ArrowView1.Shape := SpeedometerArrowShapes.Linear;

ArrowView1.Width := 0.06;

s.EndUpdate;

End Sub Button1OnClick;

If the user presses the button after executing this example, the design of scale arrows of the speedometer that is displayed in the SpeedometerBox1 component is changed. Two arrows are created for the scale. Its own design is assigned to each arrow.

See also:

ISpeedometerArrowViews