ISpeedometerView.LeftMargin

Syntax

LeftMargin: Double;

Description

The LeftMargin property determines the speedometer margin from the left side of the component.

Comments

The value is pointed in [0; 1] range.

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;

v: ISpeedometerView;

Back: ISpeedometerBackground;

Begin

s := SpeedometerBox1.Speedometer;

v := s.View;

s.BeginUpdate;

Back := v.Background;

Back.Type := SpeedometerBackgroundType.Gradient;

Back.GradientAngle := 45;

Back.GradientColor := GxColor.FromName("Red");

v.BottomMargin := 0.1;

v.LeftMargin := 0.1;

v.RightMargin := 0.1;

v.TopMargin := 0.1;

s.EndUpdate;

End Sub Button1OnClick;

If the user presses the button after executing this example, the parameters of speedometer design that is displayed in the SpeedometerBox1 component are changed. The gradient background and indents from the component sides to speedometer sides are set.

See also:

ISpeedometerView