【发布时间】:2011-05-23 01:13:25
【问题描述】:
我在 Dialog1.py 文件中有一个自定义 Dialog 类
class Dialog1(wx.Dialog):
def __init__(self, prnt):
wx.Dialog.__init__(self, id=wxID_DIALOG1, name='Dialog1', parent=prnt,
pos=wx.Point(110, 140), size=wx.Size(400, 498),
style=wx.DEFAULT_DIALOG_STYLE, title='Dialog1')
在其他文件 Frame - wx.Frame with button
self.button1.Bind(wx.EVT_BUTTON, self.Dec, id=wxID_FRAME3BUTTON1)
以及显示对话框的方法
def Dec(self, event):
import Dialog1
self.dialog = Dialog1(self)
self.dialog.ShowModal()
#dialog.Destroy()
return True
当我按下此按钮时出现错误;
TypeError: 'module' is not Callable
为什么?请帮帮我
编辑:好的,现在可以工作了,很多复制粘贴方法......对不起
REMOVE THIS QUESTION
【问题讨论】:
-
应作者要求投票结束
标签: module dialog wxpython callable