def __addRightClickMenu(self, widget):
widget.bind("<FocusIn>", self.__checkCopyAndPaste, add="+")
widget.bind("<FocusOut>", self.__checkCopyAndPaste, add="+")
if widget.var is None: # TEXT:
widget.bind('<KeyRelease>', self.__checkCopyAndPaste)
widget.bind('<<Paste>>', self.__checkCopyAndPaste)
else:
widget.var.trace(
"w",
lambda name,
index,
mode,
e=None,
w=widget: self.__checkCopyAndPaste(
e,
w)) # ENTRY/OPTION
if self.platform in [self.WINDOWS, self.LINUX]:
widget.bind('<Button-3>', self.__rightClick)
else:
widget.bind('<Button-2>', self.__rightClick)
评论列表
文章目录