Einzelnen Beitrag anzeigen

trolojik2

Registriert seit: 27. Jul 2007
14 Beiträge
 
#7

Re: Listbox1.items.delete[1] Problem

  Alt 27. Jul 2007, 01:55
woaw it works you are number one
Sorry about my english

I putted form a scrollbar, listbox's fake scrollbar

Delphi-Quellcode:
procedure TForm1.ScrollBar1Change(Sender: TObject);
begin
listbox1.ItemIndex:=scrollbar1.Position;
end;

and when deleted

Delphi-Quellcode:
procedure TForm1.Button2Click(Sender: TObject);
var
 i:integer;
begin
  I := ListBox1.ItemIndex; // The "old newspos"
  ListBox1.items.Delete(1);
  ListBox1.ItemIndex := I;
  scrollbar1.Max:=listbox1.Items.Count-1;

end;
it works too but fake way

thanks for your help.

Regards
  Mit Zitat antworten Zitat