Einzelnen Beitrag anzeigen

Benutzerbild von Neutral General
Neutral General

Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#2

Re: Zugriffsverletzung bei free?

  Alt 4. Mär 2007, 19:21
Delphi-Quellcode:
procedure Tform1.ItemEditOnKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
  If Key = VK_Return then
    begin
      ListView1.ItemFocused.SubItems.Strings[0] := (Sender as TEdit).Text;
      TEdit(Sender).OnExit := nil; // <---
      Sender.Free;
    end;
end;
Schreib das mal so.. Is nur son Gefühl...
Keine Garantie!

Gruß
Neutral General
Michael
"Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
  Mit Zitat antworten Zitat