wxpython GetStatusText()
Hey, I ha开发者_JAVA技巧ve a wxpython frame object with a status bar. I can do self.SetStatusText() without any trouble, but when I do self.GetStatusText() I get this error:
Traceback (most recent call last):
File
"D:\python\code\test.pyw",
line 87, in <module>
frame = mainframe() File "D:\python\code\test.pyw",
line 40, in __init__
self.serverfield.SetValue(self.serverinfo())
File
"D:\python\code\test.pyw",
line 78, in serverinfo
status = self.GetStatusText(0) AttributeError: 'mainframe' object has
no attribute 'GetStatusText'
Because there is no such function. See the documentation. Try self.GetStatusBar().GetStatusText()
, as defined here.
精彩评论