Say I'm a wx.Window() with any number of parents above me. Is
there an easy, generic way to get a reference to either of:
+ the wx.App() object, from which I can derive the top level
frame.
+ the top level frame
I've looked through the wxWindows docs, can't find anything, but
I could have missed it.
···
--
Paul
Um, ok. "You're a wx.Window()"
regular parents
grand parents
adoptive parents
god parents
Ok...I can see that...
How about something like:
myApp = wx.GetApp()
myFrame = myApp.GetTopWindow()
-Jim
···
On Tue, 2003-11-18 at 13:24, Paul McNett wrote:
Say I'm a wx.Window() with any number of parents above me. Is
there an easy, generic way to get a reference to either of:
+ the wx.App() object, from which I can derive the top level
frame.
+ the top level frame
I've looked through the wxWindows docs, can't find anything, but
I could have missed it.
Jim West writes:
myApp = wx.GetApp()
<slapping forehead> I could have had a V8. Thanks!
···
--
Paul
Robin
4
Paul McNett wrote:
Say I'm a wx.Window() with any number of parents above me. Is there an easy, generic way to get a reference to either of:
+ the wx.App() object, from which I can derive the top level frame.
As has alrady been mentioned,
wx.GetApp()
+ the top level frame
wx.GetTopLevelParent(window)
Which could be different than wx.GetApp().GetTopWindow() if there is more than one frame or dialog.
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!