Dein Edit empfängt die Meldung
CM_TEXTCHANGED,
wenn du den Namen des Edit änderst.
Beispiel:
Delphi-Quellcode:
type TmyEdit = class(TEdit)
private
procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED;
end;
...
...
hedit : TMyEdit;
implementation
{$R *.dfm}
procedure TMyEdit.CMTextChanged(var Message: TMessage);
begin
inherited;
ShowMessage('Name geändert');
end;
procedure TForm83.Button1Click(Sender: TObject);
begin
hedit.Name := 'neuername';
end;
procedure TForm83.FormCreate(Sender: TObject);
begin
hedit := TMyEdit.Create( self );
hedit.Visible := true;
hedit.Left := 10;
hedit.Top := 10;
hedit.Width := 210;
hedit.Height := 40;
hedit.Parent := form83;
end;