Color: IGxColor;
The Color property determines the color of scale tick mark filling.
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: ISpeedometerScaleView;
MajTick, MinTick: ISpeedometerTickInfo;
Begin
s := SpeedometerBox1.Speedometer;
v := s.View;
s.BeginUpdate;
ScaleView := v.ScaleViews.Item(0);
MajTick := ScaleView.MajorTickInfo;
MinTick := ScaleView.MinorTickInfo;
//Main
MajTick.Color := GxColor.FromName("Green");
MajTick.Height := 3;
MajTick.Proportion := 0.2;
MajTick.Shape := SpeedometerTickShapes.Rombus;
//Additional
MinTick.Color := GxColor.FromName("Red");
MinTick.Height := 2;
MinTick.Proportion := 0.3;
MinTick.Shape := SpeedometerTickShapes.Rect;
s.EndUpdate;
End Sub Button1OnClick;
If the user presses the button after executing this example, the design of main and additional scale tick marks of the speedometer that is displayed in the SpeedometerBox1 component is changed. The main tick marks are displayed as the green diamond, the diamond side is 3 millimeters, the diamond diagonals ratio is 0,2. The additional tick marks are displayed as red rectangles, the height of rectangle is 2 millimeters, the width and height ratio is 0,3.
See also: