4 Jul 01:55
ArtProvider and IconBundle, plus general style questions
Pavlo Shchelokovskyy <shchelokovskyy <at> gmail.com>
2009-07-03 23:55:06 GMT
2009-07-03 23:55:06 GMT
Hi all, after looking at wxWidgets docs on wxArtProvider here http://docs.wxwidgets.org/trunk/classwx_art_provider.html#0bb64950e85d0cc36977c01f864fdef8 I see that there exists a CreateIconBundle method that can be overridden to provide custom icon bundles. Unfortunately I could not find such thing in wxPython, only CreateBitmap and CreateIcon. So the question is - is there a native way to get wx.IconBundle from wx.ArtProvider in wxPython (on MSW at least)? The only alternative coming to my mind would be to tweak the overridden CreateIcon method to return either wx.Icon or wx.IconBundle depending on supplied artid. And since I'm asking about ArtProvider, I would also like to ask a more general style question. Since I'm creating the custom ArtProvider, it involves creating custom ArtID's (as constants). These ArtID's must be usable inside my package itself, but also from outside of the package (to be able to use them when calling the custom ArtProvider). Where should I better store the definitions of my custom ArtID's from the convenience/style point of view? What I'm doing now is putting them in a separate module called id, and then using "from id import *" from inside the package and "from mypackage import id" from outside of the package. Actually this question is interesting for me not only for wx, but for Python in general (where to better store package constants). Thanks for help, Pavlo. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "wxPython-users" group. To post to this group, send email to wxPython-users <at> googlegroups.com To unsubscribe from this group, send email to wxPython-users+unsubscribe <at> googlegroups.com For more options, visit this group at http://groups.google.com/group/wxPython-users?hl=en -~----------~----~----~----~------~----~------~--~---
RSS Feed