[wxPython-users] How does wx.ArtProvider_GetIcon influences wx.ArtProvider_GetBitmap

Robin Dunn robin at alldunn.com
Sat Jul 1 11:47:43 PDT 2006


Yuan HOng wrote:
> I am trying to create a custom dialog to display error messages. I'd
> like to set the window icon of the dialog to wx.ART_ERROR, and in the
> dialog I also want to display a bitmap of the same image.
> 
> I find that under Windows, once you call wx.ArtProvider_GetIcon,
> subsequent calls to wx.ArtProvider_GetBitmap will return strange
> results.
> 
> In the attached test, the dialog is shown correctly the first time.
> When you click 'Test' button to show it the second time, the bitmap
> lost its transparant background. And for the third time, the image
> vanishes completely. Commenting out the call to ArtProvider_GetIcon
> will produce the same bitmap for all invocation of the dialog.
> 
> I tested this under Windows XP with Python 2.4 and wxPython 2.6.2.1
> Unicode build.
> 
> Why does calls to wx.ArtProvider_GetIcon influence subsequent calls to
> ArtProvider_GetBitmap?

I don't see the problem here.  Please try version 2.6.3.2.


>  Besides, what does the 'client' parameter to
> the function call actually mean?

It's designed to be a way to have different collections of images with 
the same IDs, but I don't think anybody is using it that way yet.


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





More information about the wxpython-users mailing list