def _unbindfuncs(self):
# I would need a list of the functions that been bound to unbind them
while True:
try:
widget, event, dynboundmethod = self._dynbindings.pop()
except IndexError:
break # no more items in the list
else:
if event in [wx.EVT_MENU, wx.EVT_TOOL]:
self.Unbind(event, handler=dynboundmethod, id=widget.GetId())
elif event in [wx.EVT_SIZE]:
self.Unbind(event, handler=dynboundmethod)
else:
widget.Unbind(event, handler=dynboundmethod)
评论列表
文章目录