Einzelnen Beitrag anzeigen

Benutzerbild von Die Muhkuh
Die Muhkuh

Registriert seit: 21. Aug 2003
7.332 Beiträge
 
Delphi 2009 Professional
 
#6

Re: Listbox1.items.delete[1] Problem

  Alt 27. Jul 2007, 01:47
Hi,

i tried this here:

Delphi-Quellcode:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
  ListBox1.ItemIndex := ListBox1.TopIndex; // marked
  ListBox1.Selected[ListBox1.TopIndex] := false; // marked

  ListBox1.Items.Delete(Random(ListBox1.Items.Count)); // just for test
end;
I think it works well. Maybe you should try the marked lines of code

[edit]OK, sometimes it doens't work perfect, but it'll be a good start for the perfect code [/edit]
  Mit Zitat antworten Zitat