Grausam wenn man stundenlang sucht...es ins Forum stellt und es dann mit ein paar Codezeilen behebt
Delphi-Quellcode:
type
TFocusLostEvent = procedure (Sender:TObject) of Object;
Type
TFocusEdit = class (TEdit)
Private
m_pmfnFocusLost :TFocusLostEvent;
procedure WMKillFocus(var Message: TWMKillFocus); message WM_KILLFOCUS;
Public
property OnFocusLost:TFocusLostEvent read m_pmfnFocusLost write m_pmfnFocusLost;
End;
---
{ TFocusEdit }
procedure TFocusEdit.WMKillFocus(var Message: TWMKillFocus);
begin
inherited;
if Assigned(m_pmfnFocusLost) then
begin
OnFocusLost(Self);
end;
end;
Und dabei war es so simpel ;_;