Registriert seit: 12. Aug 2003
Ort: Soest
4.016 Beiträge
Delphi 10.1 Berlin Enterprise
|
Re: TPanel OnMouseExit?
23. Dez 2004, 09:13
Moin!
Delphi-Quellcode:
type
TPanel = class(ExtCtrls.TPanel)
protected
procedure WMMouseMove( var Message: TWMMouse); message WM_MOUSEMOVE;
procedure WMMouseLeave( var Message: TWMMouse); message WM_MOUSELEAVE;
end;
{...}
procedure TPanel.WMMouseLeave( var Message: TWMMouse);
begin
inherited;
if BevelOuter = bvRaised then
BevelOuter := bvNone;
end;
procedure TPanel.WMMouseMove( var Message: TWMMouse);
var
EventTrack: TTrackMouseEvent;
begin
inherited;
if BevelOuter = bvNone then
begin
BevelOuter := bvRaised;
EventTrack.dwFlags := TME_LEAVE;
EventTrack.hwndTrack := Handle;
EventTrack.cbSize := SizeOf(EventTrack);
TrackMouseEvent(EventTrack);
end;
end;
MfG
Stevie
|