ISpeedometerTickInfo.Pen

Syntax

Pen: IGxPen;

Description

The Pen property determines the pen that renders speedometer scale tick mark border.

Example

Executing the 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: ISpeedometerTickInfo;

Begin

s := SpeedometerBox1.Speedometer;

v := s.View;

s.BeginUpdate;

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

MajTick := ScaleView.MajorTickInfo;

MajTick.Color := GxColor.FromName("Red");

MajTick.Height := 4;

MajTick.Pen := New GxPen.CreateSolid(GxColor.FromName("Green"));

MajTick.Proportion := 0.3;

MajTick.Shape := SpeedometerTickShapes.Rombus;

s.EndUpdate;

End Sub Button1OnClick;

After executing the example, on clicking the button, the formatting of major speedometer scale tick marks displayed in the SpeedometerBox1 component is changed. Major tick marks are displayed as red diamonds, the diamond side is 4 millimeters, the diamond diagonals ratio is 0.3. The border of tick marks is highlighted with green color.

See also:

ISpeedometerTickInfo