Search code examples
pythonuser-interfacedialogwxpythoncustomdialog

Access native windows icons for custom wxDialogs


I want to subclass wx.Dialog to get a little more functionality than is provided by the wx.MessageDialog class but I would still like to be able to use the native windows icons (ie the ones used in the wx.MessageDialog that can be set by the flags such as wx.ICON_ERROR etc.. )

Is there anyway to access these?

Update:

Thanks to steven for pointing out that this can easily be accomplished with wx.ArtProvider

e.g.

wx.ArtProvider.GetBitmap(wx.ART_ERROR, wx.ART_CMN_DIALOG)

Solution

  • This should do the trick:

    wx.ArtProvider.GetBitmap(wx.ART_ERROR, wx.ART_CMN_DIALOG)