我在文件 Dialog1.py 中有一个自定义对话框类
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 中,带有按钮
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