Out Of System resources using ImageListIndex

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
okra
Newbie
Newbie
Posts: 4
Joined: Fri Mar 14, 2008 12:00 am

Out Of System resources using ImageListIndex

Post by okra » Fri Jun 06, 2008 7:20 am

With TeeTree using ImageList, it shows an "Out of system resources" error
with a 5900 nodes tree.

The image assignment for each node is:

Node->ImageListIndex = value;

only 3 diferente images 16x16 using at a time.

With de internal image pool it do well.

it is running on a WindowsXP 1GB memory PC.

Any workaround?

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Tue Jun 10, 2008 9:04 pm

Hi okra,

The advantage of using the global array of images is that when several nodes share the same image, the image is allocated into memory only once.

You can add your own images to the image pool, using following code:

customIndex:= TreeImagePool.Add( Image1.Picture );

The performance will also be much better using this approach (dynamic array of pictures)

Regards,
Tom

Post Reply