Pen: IGxPen;
The Pen property determines the stylus that draws the arrow border.
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;
ArrowView: ISpeedometerArrowView;
Pen: IGxPen;
Begin
s := SpeedometerBox1.Speedometer;
v := s.View;
s.BeginUpdate;
ScaleView := v.ScaleViews.Item(0);
ArrowView := ScaleView.ArrowViews.Item(0);
Pen := New GxPen.CreateSolid(GxColor.FromName("Red"));
ArrowView.Pen := Pen;
ArrowView.Shape := SpeedometerArrowShapes.Triangle;
ArrowView.Width := 0.1;
s.EndUpdate;
End Sub Button1OnClick;
If the user presses the button after executing this example, the design of scale arrow of the speedometer that is displayed in the SpeedometerBox1 component is changed. For the arrow there will be width and stylus, that draws the arrow border. The shape of the arrow is also changed.
See also: