我在學習wxPython 2.8和Pycharm 1.2.1。 (Python版本 - 2.6.6,Windows XP)。 我的第一個程序(從http://wiki.wxpython.org/Getting%20Started#A_First_Application:_.22Hello.2C_World.22):蟒蛇hi.py:在Pycharm IDE中wxPython控件的奇怪行爲
# hi.py
import wx
class MyFrame(wx.Frame):
""" We simply derive a new class of Frame. """
def __init__(self, parent, title):
wx.Frame.__init__(self, parent, title=title, size=(200,100))
self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE)
self.Show(True)
app = wx.App(False)
frame = MyFrame(None, 'Small editor')
app.MainLoop()
它像開始時運行正常。 但是,當它從PyCharm 開始時,Frame上沒有控制TextCtrl。 這是爲什麼?
對不起。這是我的錯誤... – Vax 2011-04-13 07:00:49