0
我有兩個框架 - mainWindow,它是「主」框架,moreWindow,它是mainWindow的子項。我想在單擊mainWindow中的按鈕時顯示更多的窗口。這裏就是我想:顯示子wx.Frame?
def showChild(nil):
moreWindow.Show()
class mainWindow(wx.Frame):
def __init__:
buttonMore.Bind(wx.EVT_BUTTON, showChild)
class moreWindow(wx.Frame):
TypeError: unbound method Show() must be called with moreWindow instance as first argument (got nothing instead)
我試着用moreWindow.Show(moreWindow)
,而只是給了一個更神祕的錯誤。
是什麼,當你嘗試,你得到了錯誤? – iabdalkader
@mux'TypeError:未綁定方法Show()必須用moreWindow實例作爲第一個參數調用(取而代之的是類型實例)' – tkbx
對不起,請檢查我的答案。 – iabdalkader