[wxPython-users] determine App instance
Raffaello Barella
barbarossa.platz at gmail.com
Sat Dec 15 22:05:25 PST 2007
Would you please let me know how to store an image inside an application,
either in one/many frames or in the object TheApp? I thought it was only
possible to load the image from an existing file any time it was needed.
Thanks.
2007/12/15, Mark Erbaugh <mark at microenh.com>:
>
> On Sat, 2007-12-15 at 10:16 -0800, Christopher Barker wrote:
> > > Is there a built-in mechanism for a wx.Frame to determine the wx.App
> > > instance?
> >
> > yes --
> >
> > TheApp =3D wx.GetApp()
> >
> > And you can use it anywhere -- it's in the wx module, not a Frame
> > method.
> >
> > > I'm considering using the wx.App instance to store global data,
> > > particularly some bitmaps for wx.BitmapButton's.
> >
> > Are those same bitmaps used in multiple places? If not, I'd store
> > them
> > where they are used, but if so, then that's a fine solution.
>
>
> Yes, these are bitmaps for buttons that will be used on multiple frames
> to give the app a consistent appearance.
>
> Thanks for the wx.GetApp() pointer
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200712=
16/0a2114a7/attachment.htm
More information about the wxpython-users
mailing list