BorderPen: IGxPen;
The BorderPen property determines the stylus that draws the speedometer 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;
Br: IGxLinearGradientBrush;
Pen: IGxPen;
Begin
s := SpeedometerBox1.Speedometer;
v := s.View;
s.BeginUpdate;
Br := New GxLinearGradientBrush.Create(GxColor.FromName("Red"), GxColor.FromName("Green"), 30);
Pen := New GxPen.CreateBrushed(Br);
Pen.DashStyle := GxDashStyle.DashDot;
v.BorderPen := Pen;
s.EndUpdate;
End Sub Button1OnClick;
If the user presses the button after executing this example, the design of the SpeedometerBox1 component borders is set.
See also: