【发布时间】:2015-07-14 18:44:53
【问题描述】:
class ListCtrl(wx.ListCtrl):
def __init__(self, parent):
super(ListCtrl, self).__init__(parent,size=(1200,700))
def delete_items(self):
self.DeleteAllItems()
class One(wx.Panel):
b =wx.Button()
b.bind(**Listbox.delete_items**)
class Two(wx.Panel):
self.lb = Listbox(self)
*在我的应用程序中,我有两个面板。类 One 代表包含按钮的侧边栏面板。第二类代表包含列表框的主面板。
如何通过其父级属于另一个类 (Two) 的按钮(在本例中为从列表框中删除项目)调用函数?*
【问题讨论】: