ISpeedometerScale.MajorTickCount

Syntax

MajorTickCount: Integer;

Description

The MajorTickCount property determines the number of main scale tick marks.

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;

Scale: ISpeedometerScale;

Begin

s := SpeedometerBox1.Speedometer;

s.BeginUpdate;

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

Scale.MajorTickCount := 10;

Scale.MinorTickCount := 5;

Scale.MaxValue := 100;

Scale.MinValue := -100;

Scale.Precision := 2;

s.EndUpdate;

End Sub Button1OnClick;

If the user presses the button after executing this example, the parameters of speedometer scale that is displayed in the SpeedometerBox1 component are changed. The minimum and maximum displayed value, the number of main and additional tick marks are determined for the scale. The values on the scale are displayed accurate to two signs after the point.

See also:

ISpeedometerScale