AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Listbox1.items.delete[1] Problem

Ein Thema von trolojik2 · begonnen am 27. Jul 2007 · letzter Beitrag vom 27. Jul 2007
 
Benutzerbild von Die Muhkuh
Die Muhkuh

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

Re: Variable global in einer Pas Datei

  Alt 27. Jul 2007, 00:16
Hi trolojik2,
at first: Welcome to the Delphi-PRAXiS

I think, the ListBox isn't a good component to keep about 1000 items. Maybe you should take a look to Mike Lischke's VirtualStringTree.

I think you have a button to delele the news? So you should keep the delete pos into a variable and scroll to it, after you deleted the old news, just like that:

Delphi-Quellcode:
procedure TForm1.DeleteNews(Sender: TObject);
var
  I: Integer;
begin
  I := ListBox1.ItemIndex; // The "old newspos"
  ListBox1.Delete(I);
  ListBox1.ItemIndex := I;
end;
Regards,

Manuel
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:46 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz