lcl: add new TImage event OnPictureChanged

git-svn-id: trunk@17065 -
This commit is contained in:
paul 2008-10-20 04:46:40 +00:00
parent 4104418b88
commit c29b56e233
2 changed files with 5 additions and 0 deletions

View File

@ -553,6 +553,7 @@ type
TCustomImage = class(TGraphicControl) TCustomImage = class(TGraphicControl)
private private
FOnPictureChanged: TNotifyEvent;
FPicture: TPicture; FPicture: TPicture;
FCenter: Boolean; FCenter: Boolean;
FProportional: Boolean; FProportional: Boolean;
@ -592,6 +593,7 @@ type
property Stretch: Boolean read FStretch write SetStretch default False; property Stretch: Boolean read FStretch write SetStretch default False;
property Transparent: Boolean read FTransparent write SetTransparent default False; property Transparent: Boolean read FTransparent write SetTransparent default False;
property Proportional: Boolean read FProportional write SetProportional default False; property Proportional: Boolean read FProportional write SetProportional default False;
property OnPictureChanged: TNotifyEvent read FOnPictureChanged write FOnPictureChanged;
end; end;
@ -620,6 +622,7 @@ type
property OnMouseMove; property OnMouseMove;
property OnMouseUp; property OnMouseUp;
property OnPaint; property OnPaint;
property OnPictureChanged;
property OnResize; property OnResize;
property OnStartDrag; property OnStartDrag;
property ParentShowHint; property ParentShowHint;

View File

@ -155,6 +155,8 @@ begin
Picture.Graphic.Transparent := FTransparent; Picture.Graphic.Transparent := FTransparent;
end; end;
invalidate; invalidate;
if Assigned(OnPictureChanged) then
OnPictureChanged(Self);
end; end;
function TCustomImage.DestRect: TRect; function TCustomImage.DestRect: TRect;