> A quick reply - I'll have a proper look tomorrow. Great!
> 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. Nope, because the ImageList keeps a reference to the bitmap. Besides, we should be (and we are) able to even write it like this: $ExplorerImageList->Add("file_folder.bmp"); Then the Add() method of ImageList will de new Win32::GUI::Bitmap for us. I tested both ways and now also as my $img = new Win32::GUI::Bitmap("test.bmp"); $Tb1ImageList->Add($img); ($Tb1ImageList is the only ImageList used in the example but you'll see tomorrow) But it all doesn't make a difference... cheers Roelof Bos Original message > > 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 > > > > > > >