本文整理汇总了Python中Delegator.Delegator.setdelegate方法的典型用法代码示例。如果您正苦于以下问题:Python Delegator.setdelegate方法的具体用法?Python Delegator.setdelegate怎么用?Python Delegator.setdelegate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Delegator.Delegator
的用法示例。
在下文中一共展示了Delegator.setdelegate方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setdelegate
# 需要导入模块: from Delegator import Delegator [as 别名]
# 或者: from Delegator.Delegator import setdelegate [as 别名]
def setdelegate(self, delegate):
if self.delegate is not None:
self.unbind("<<toggle-auto-coloring>>")
Delegator.setdelegate(self, delegate)
if delegate is not None:
self.config_colors()
self.bind("<<toggle-auto-coloring>>", self.toggle_colorize_event)
self.notify_range("1.0", "end")
示例2: setdelegate
# 需要导入模块: from Delegator import Delegator [as 别名]
# 或者: from Delegator.Delegator import setdelegate [as 别名]
def setdelegate(self, delegate):
if self.delegate is not None:
self.unbind("<<undo>>")
self.unbind("<<redo>>")
self.unbind("<<dump-undo-state>>")
Delegator.setdelegate(self, delegate)
if delegate is not None:
self.bind("<<undo>>", self.undo_event)
self.bind("<<redo>>", self.redo_event)
self.bind("<<dump-undo-state>>", self.dump_event)
示例3: setdelegate
# 需要导入模块: from Delegator import Delegator [as 别名]
# 或者: from Delegator.Delegator import setdelegate [as 别名]
def setdelegate(self, delegate):
if self.delegate is not None:
self.unbind("<<toggle-auto-coloring>>")
Delegator.setdelegate(self, delegate)
if delegate is not None:
self.config_colors()
self.bind("<<toggle-auto-coloring>>", self.toggle_colorize_event)
self.notify_range("1.0", "end")
else:
# No delegate - stop any colorizing
self.stop_colorizing = True
self.allow_colorizing = False
示例4:
# 需要导入模块: from Delegator import Delegator [as 别名]
# 或者: from Delegator.Delegator import setdelegate [as 别名]
import sys
示例5:
# 需要导入模块: from Delegator import Delegator [as 别名]
# 或者: from Delegator.Delegator import setdelegate [as 别名]
import time