Page 1 of 1

Out Of System resources using ImageListIndex

Posted: Fri Jun 06, 2008 7:20 am
by 10048638
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?

Posted: Tue Jun 10, 2008 9:04 pm
by Tom
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