AGB  ·  Datenschutz  ·  Impressum  







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

Maximale Anzahl von Items

Ein Thema von DelphiUser123 · begonnen am 18. Jan 2025 · letzter Beitrag vom 19. Jan 2025
 
Kas Ob.

Registriert seit: 3. Sep 2023
457 Beiträge
 
#5

AW: Maximale Anzahl von Items

  Alt 19. Jan 2025, 08:45
Hallo liebes Forum.
Ich habe folgende simple Frage: Wie viele Einträge passen heutzutage maximal in eine Delphi Listbox?
Traditionally it was 32k (32*1024 to be exact), but this was in legacy and old Windows, now you can reach 64k with no problem.

try this
Delphi-Quellcode:
procedure TForm10.Button1Click(Sender: TObject);
const
  EXTRA = 1;
  //EXTRA = 50;
var
  i: Integer;
begin
  ListBox1.Items.BeginUpdate;
  try
    for i := 0 to 1024 * 32 * 2 + EXTRA do
      ListBox1.Items.Add(IntToStr(i));
  finally
    ListBox1.Items.EndUpdate;
  end;
end;
On my Windows 10 and My Delphi XE8 and with EXTRA at 50 it start to behave erratically when you drag the scrollbar in big steps to the end, but will show them (items) correctly if you used different way of scrolling like mouse wheel, and this might be a problem in VCL and not in the OS itself.

As for Microsoft suggestion, it is merely a best practice, with Windows themes and font scaling the cache used by the OS does suffer with huge amount of items, thus the suggestion to switch to virtual mode, but this happen only with specific theming a long with specific scaling with small memory GPU cards.
Kas
  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 01:08 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