IDE: added TCustomSpeedButton.OnMouseEnter/Exit from Graeme

git-svn-id: trunk@11034 -
This commit is contained in:
mattias 2007-04-29 21:20:09 +00:00
parent 1a0ed911f7
commit 23019e0308
2 changed files with 10 additions and 0 deletions

View File

@ -294,6 +294,8 @@ type
FLayout: TButtonLayout;
FMargin: integer;
FMouseInControl: Boolean;
FOnMouseEnter: TNotifyEvent;
FOnMouseExit: TNotifyEvent;
FShortcut: TShortCut;
FShowAccelChar: boolean;
FShowCaption: boolean;
@ -359,6 +361,8 @@ type
property ShowCaption: boolean read FShowCaption write SetShowCaption default true;
property Spacing: integer read FSpacing write SetSpacing default 4;
property Transparent: Boolean read FTransparent write SetTransparent default true;
property OnMouseEnter: TNotifyEvent read FOnMouseEnter write FOnMouseEnter;
property OnMouseExit: TNotifyEvent read FOnMouseExit write FOnMouseExit;
end;
@ -389,6 +393,8 @@ type
property OnClick;
property OnDblClick;
property OnMouseDown;
property OnMouseEnter;
property OnMouseExit;
property OnMouseMove;
property OnMouseUp;
property OnPaint;

View File

@ -841,6 +841,7 @@ begin
then begin
FMouseInControl := True;
UpdateState(true);
if Assigned(FOnMouseEnter) then FOnMouseEnter(Self);
end;
end;
@ -859,7 +860,10 @@ begin
then begin
FMouseInControl := False;
if Enabled then
begin
UpdateState(true);
if Assigned(FOnMouseExit) then FOnMouseExit(Self);
end;
end;
end;