Pycharm IDE中wxPython控件的奇怪行为

时间:2011-04-13 04:51:05

标签: wxpython pycharm

我正在学习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
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()

启动时运行正常:python hi.py。 但是当它从PyCharm开始 Frame上没有控件TextCtrl。 为什么这样?

1 个答案:

答案 0 :(得分:0)

许多IDE在内部运行GUI应用程序时遇到问题。我记得PyScripter中的类似问题并不是很确定,Wing IDE?据我所知,唯一似乎没有任何问题的IDE是Eclipse + PyDev。