回答此问题可获得 20 贡献值,回答如果被采纳可获得 50 分。
<p>我正在尝试自定义弹出窗口,并做了以下事情。在</p>
<pre><code>class MyDialog(wx.PopupTransientWindow):
def __init__(self, parent, title, cellnum, cmd, **kwargs):
super(MyDialog, self).__init__(parent, style=wx.CLIP_CHILDREN | wx.FRAME_NO_TASKBAR |wx.FRAME_SHAPED, **kwargs)
# def __init__(self, parent, style, cellnum, cmd):
# super(MyDialog, self).__init__(parent, style=wx.CLIP_CHILDREN | wx.FRAME_NO_TASKBAR | wx.NO_BORDER|wx.FRAME_SHAPED)
# self.panel = wx.Panel(self)
#size=(255,200)#one kind of size
self.panel = Panel1(self)
</code></pre>
<p>但当我打电话给他时:</p>
^{2}$
<p>显示以下错误:</p>
<pre><code>Traceback (most recent call last):
File "D:\X000T9P77\projects\MYTEST\docs\MYTEST_gui_module_src\MYTESTGUI.py", line 1465, in ShowMessage1
dial = MyDialog(self, "CELL "+id, id, cmd, pos=ldPos)
File "D:\X000T9P77\projects\MYTEST\docs\MYTEST_gui_module_src\MYTESTGUI.py", line 103, in __init__
super(MyDialog, self).__init__(parent, style=wx.CLIP_CHILDREN | wx.FRAME_NO_TASKBAR |wx.FRAME_SHAPED, **kwargs)
File "C:\Python27\lib\site-packages\wx-3.0-msw\wx\_windows.py", line 2141, in __init__
_windows_.PopupTransientWindow_swiginit(self,_windows_.new_PopupTransientWindow(*args, **kwargs))
TypeError: new_PopupTransientWindow() takes at most 2 arguments (3 given)
</code></pre>
<p>有人能帮我吗。
事先非常感谢。在</p>