Hi,

A quick reply - I'll have a proper look tomorrow.

This sounds like a scoping issue. Take the line:

$ExplorerImageList->Add(new Win32::GUI::Bitmap("file_folder.bmp"));

This will add a newly created bitmap to the image list - but the bitmap will be "destroyed" by Perl since it thinks the object is not used any longer. Having the bitmaps in a global var should solve your problem.

Cheers,

jez.

----- Original Message ----- From: "Roelof Bos" <[EMAIL PROTECTED]>
To: <perl-win32-gui-users@lists.sourceforge.net>
Sent: Sunday, November 28, 2004 5:04 PM
Subject: [perl-win32-gui-users] Treeview, Toolbar and Imagelist problem. Memory trouble?


Hi,

I have this test application (see attachment) with a toolbar and a
treeview.

The treeview lists the drives an files on my computer.  The toolbar just
contains 10 test buttons with images. The treeview and toolbar
theirselfs seem to work fine. But if I expand an item in the treeview
twice (expand,expand or expand,collapse) the images in the toolbar
dissapear. Not directly, but as soon as I move my mouse cursor over them
the dissapear. OR if i minimize the window and then re-show it all
images are gone. I used images in the treeview as well and here the same
happens. I have tried a lot things but nothing seems to help.

Is this a problem of the GUI::ImageList object? Or a problem of the
Treeview object?

Is there anyone who knows a workaround to keep my images "alive"?

cheers,
Roelof Bos

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.801 / Virus Database: 544 - Release Date: 24-11-2004





Reply via email to