Hi all,
I cannot get SetStatusBar method to work, e.g. the following code shows nothing
from wxPython.wx import wxApp, wxFrame, wxStatusBar
class App(wxApp):
“”“The top application class.”""
def OnInit(self):
#Create frame.
frame = wxFrame(None, -1, "Test frame widget.")
stb = wxStatusBar()
frame.SetStatusBar(stb)
#Show frame and set it as the top one.
frame.Show(1)
self.SetTopWindow(frame)
#Return value to enter mainloop.
return 1
a = App(0)
a.MainLoop()
I tried every combination I could think of with SetStatusBar but nothing worked.
OTOH the following ways to create a status bar work:
-
use wxFrame method CreateStatusBar()
-
use wxStatusBar(frame, -1) (NOT followed by SetStatusBar() of course, because if we do it, nothing happens again.)
Anybody knows what I am missing to make the SetStatusBar frame method work?
Thanks,
Gonçalo Rodrigues