Selected images in wxListCtrl not visible Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
max.t
Experienced Solver
Experienced Solver
Posts: 88
Joined: Sun May 20, 2007 4:17 pm

Selected images in wxListCtrl not visible

Post by max.t » Fri Jul 06, 2007 10:48 pm

If I select an item (image and text) in a ListCtrl the text is inverted but the image just disappears (it reappears by deselecting the item). In hte ListCtrl-sample a selected icon is grayed out, but i can't find the trick.

mc2r
wxWorld Domination!
wxWorld Domination!
Posts: 1195
Joined: Thu Feb 22, 2007 4:47 pm
Location: Denver, Co
Contact:

Post by mc2r » Fri Jul 06, 2007 11:29 pm

The only thing I can think of is maybe its your image? Try using one you know works in the sample. Or replace one of the images in the sample with one that doesn't work in your app.

Sorry, I got nothing other than that.

-Max

max.t
Experienced Solver
Experienced Solver
Posts: 88
Joined: Sun May 20, 2007 4:17 pm

Post by max.t » Mon Jul 09, 2007 6:57 pm

Thanks for the answer. So far, I made the follwoing experiences:
  • 1. image list with bitmaps loaded from jpgs on Win XP: selected files not visible.
    2. image list with icons from res file on Win XP: selected files are shown as desired (somehow colored with the selection color).
    3. image list with icons copied from a bitmap on Win XP: selected files are not visible.
    4. image list with bitmaps loaded from jpgs on Win 98: selected files are shown as desired!

max.t
Experienced Solver
Experienced Solver
Posts: 88
Joined: Sun May 20, 2007 4:17 pm

Post by max.t » Wed Jul 11, 2007 8:12 am

I found the solution: The images have to be added to the image list with transparency. Then, selected images are also visible in Win XP.

Post Reply