def __init__(self, *args, **kwargs):
wx.gizmos.EditableListBox.__init__(self, *args, **kwargs)
listbox = self.GetListCtrl()
listbox.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)
listbox.Bind(wx.EVT_LIST_BEGIN_LABEL_EDIT, self.OnLabelBeginEdit)
listbox.Bind(wx.EVT_LIST_END_LABEL_EDIT, self.OnLabelEndEdit)
for button, tooltip, call_function in [
(self.GetEditButton(), _("Edit item"), "_OnEditButton"),
(self.GetNewButton(), _("New item"), "_OnNewButton"),
(self.GetDelButton(), _("Delete item"), "_OnDelButton"),
(self.GetUpButton(), _("Move up"), "_OnUpButton"),
(self.GetDownButton(), _("Move down"), "_OnDownButton")]:
button.SetToolTipString(tooltip)
button.Bind(wx.EVT_BUTTON, self.GetButtonPressedFunction(call_function))
self.Editing = False
评论列表
文章目录