problem: how to shade an icon

Hi

I am developing an application that is desktop-like in
appearance. The problem that I have encountered is shading
an icon that has been placed on my desktop.

When you click on an icon on the windows desktop it gets
shaded a sort of bluey colour. I would like to do the exact
same thing, but I dont know how.

I am using code very similar to the wxDragImage example in
the demo for placing and moving icons around the screen.
One difference is that I am using a wxIcon and not a
wxBitmap (I am not very sure what the differences between
these are, but my icon files are .ico so I assume this is
the correct one to use).

Thanks for any help
Stephen Emslie

···

___________________________________________
Look Good, Feel Good www.healthiest.co.za

Stephen Emslie wrote:

Hi

I am developing an application that is desktop-like in
appearance. The problem that I have encountered is shading
an icon that has been placed on my desktop.

When you click on an icon on the windows desktop it gets
shaded a sort of bluey colour. I would like to do the exact
same thing, but I dont know how.

You can convert the icon or bitmap to a wxImage and then maniputlate the pixel data and convert back to an icon or bitmap and redraw it. See wxPython/lib/imageutils.py for an example of greying out an image.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!