Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's the limit on the number of items in TList?

Status
Not open for further replies.

LucieLastic

Programmer
May 9, 2001
1,694
GB
hi

I'm using D7 and would like to know what the limit is on the number of elements a Tlist can have.

many thanks
lou

 
Found this for Delphi 2

"MaxListSize is 134,217,727 (MaxInt div 16);"

So, I guess it'll be at least that, now. I'm currently at half a million items, so I've got a fair bit to go yet - will probably run out of memory first...

lou
[penguin]

 
Hi
You can test it yourself:
var i,max:longint;
begin
max:=1000;// try with a larger number
for i:=1 to max do
Listbox1.items.add(IntToStr(i)+' -added');

In some components the number of the lines depends not of the exact number of the lines but depends of the total bytes stored in the control.

Good Luck !
Spent
mail:spentbg@yahoo.com
 
Spent, TListBox is not the same as TList !

The source code for TList in D7 also specifies:
Code:
MaxListSize = Maxint div 16;

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top