Hi,
ich steh voll am Schlauch, wieso gibt mir folgender Code den Error "Listindex überschreitet das Maximum (-1)" aus?
Delphi-Quellcode:
//check selected state
if Listbox1.itemindex > -1 then
begin
//if a item is selected
//form4 will be showed with entrys
form4.show;
form4.Caption:='Sender editieren';
form4.Edit1.Text:=Listbox1.Items.Strings[Listbox1.itemindex];
form4.Edit2.Text:=Listbox2.Items.Strings[Listbox1.itemindex];
//channel will be deleted because form4 create it new
Listbox1.Items.Delete(Listbox1.itemindex);
Listbox2.Items.Delete(Listbox2.itemindex);
end
Danke schonmal