ISpeedometerBackground.Image

Syntax

Image: IGxImage;

Description

The Image property determines the image that is used as a background.

Example

Executing this example requires a form with the Button1 button and the SpeedometerBox component named SpeedometerBox1. There is Image.bmp file in the root of disk C.

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.Picture;

Back.Image := GxImage.FromFile("C:\Image.bmp");

Back.ImageDrawStyle := SpeedometerImageDrawStyle.Stretch;

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 Image.bmp image is set as speedometer background.

See also:

ISpeedometerBackground