procedure TFormMain.Button1Click(Sender: TObject); var S: string; begin S := '123'; Label1.Caption := 'Testing... ' + S; Edit1.Text := S; end; After removing the text: procedure TFormMain.Button1Click(Sender: TObject); begin end; Next, compile the project... and automagically, Delphi has completely removed the event-handler. Not only from the interface section, but also from the implementation and from the form-file (the .dfm file). That's a lot easier and quicker than manually removing all this stuff! And here's a familiar story... From the Object Inspector, you ask Delphi to create
empty procedures (templates) for the OnClick events of 3 buttons. You add your code
to the first procedure and you do a quick test: F9 -- great, that works. But
where have the event-handlers of the 2 other buttons gone? Right, Delphi has deleted
them... procedure TFormMain.Button1Click(Sender: TObject); begin // end; |
TOP DelphiLand Club Membership DC Library Forum Forum Archives Crash Course Delphi Tips Source Code Downloads Links