...
type
THTMLBackground =
class(TComponent)
private
fBackgroundImage: TPicture;
//Variable für das Bild
fBackgroundColor: TColor;
fBackgroundPosition: THTMLBackgroundPosition;
fBackgroundPositionInPixels: Integer;
fBackgroundRepeat: THTMLBackgroundRepeat;
published
property BackgroundImage: TPicture
read fBackgroundImage
write fBackgroundImage;
//und die Eigenschaft für den OI
property BackgroundColor: TColor
read fBackgroundColor
write fBackgroundColor;
property BackgroundPosition: THTMLBackgroundPosition
read fBackgroundPosition
write fBackgroundPosition;
property BackgroundPositionInPixels: Integer
read fBackgroundPositionInPixels
write fBackgroundPositionInPixels;
property BackgroundRepeat: THTMLBackgroundRepeat
read fBackgroundRepeat
write fBackgroundRepeat;
constructor Create(AOwner: TComponent);
override;
destructor Destroy;
override;
end;
...
...
{ THTMLBackground implementation }
constructor THTMLBackground.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
fBackgroundImage := TPicture.Create;
//Bild wird erstellt
fBackgroundColor := clNone;
fBackgroundPosition := [hbpLeft];
fBackgroundPositionInPixels := 0;
fBackgroundRepeat := hbrRepeat;
end;
destructor THTMLBackground.Destroy;
begin
fBackgroundImage.Free;
//Bild wird freigegeben
inherited Destroy;
end;