procedure TMain.ActionAutoHinzu;
var
ListItem : TListItem;
S : string;
TL : TListItem;
begin
try
with ListViewAuto do
begin
S:= LaEdAutoErsetzen.Text;
TL := FindCaption(0,AnsiUpperCase(S),false,true,true);
if Assigned(TL) then
begin
ListViewAuto.SetFocus(TL.Index);
exit;
end;
try
if Length(S) <= 0 then exit;
ListItem := Items.Add;
if S = '' then S := RS_Nix;
S:= _StringReplace(S,#32,RS_Leer);
ListItem.Caption := S;
S:= LaEdAutoDurch.Text;
if S = '' then S := RS_Nix;
S:= _StringReplace(S,#32,RS_Leer);
ListItem.SubItems.Add(S);
finally
LaEdAutoErsetzen.Clear;
LaEdAutoDurch.Clear;
LaEdAutoErsetzen.SetFocus;
end;
end;
except
end;
end;
Wenn du den Button meinst (Siehe Bild) kann ich das bei mir nicht feststellen.
Nur dieses Teil wird ausgeführt, Und selbst wenn was wäre, kann nix passieren weil das Ding noch in einer try except steckt.
MFG
Wenn man nicht weiß was man sucht, findet man auch mit Google nichts.
Bevor ich hier eine Frage stelle, wurde Google vorher befragt. Hinweise dieser Art kann man sich schenken. Im übrigen muss mir niemand antworten.