本文整理汇总了Python中tk_tools.TK_ROOT.bell方法的典型用法代码示例。如果您正苦于以下问题:Python TK_ROOT.bell方法的具体用法?Python TK_ROOT.bell怎么用?Python TK_ROOT.bell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tk_tools.TK_ROOT
的用法示例。
在下文中一共展示了TK_ROOT.bell方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: open_win
# 需要导入模块: from tk_tools import TK_ROOT [as 别名]
# 或者: from tk_tools.TK_ROOT import bell [as 别名]
def open_win(self, _=None, force_open=False):
if self._readonly and not force_open:
TK_ROOT.bell()
return 'break' # Tell tk to stop processing this event
self.win.deiconify()
self.win.lift(self.parent)
self.win.grab_set()
self.win.focus_force() # Focus here to deselect the textbox
utils.center_win(self.win, parent=self.parent)
self.sel_item(self.selected)
self.win.after(2, self.flow_items)
示例2: open_win
# 需要导入模块: from tk_tools import TK_ROOT [as 别名]
# 或者: from tk_tools.TK_ROOT import bell [as 别名]
def open_win(self, e=None, force_open=False):
if self._readonly and not force_open:
TK_ROOT.bell()
return 'break' # Tell tk to stop processing this event
self.win.deiconify()
self.win.lift(self.parent)
if self.modal:
self.win.grab_set()
self.win.focus_force() # Focus here to deselect the textbox
# If we have a sound sampler, hold the system open while the window
# is so it doesn't snap open/closed while finding files.
if self.sampler is not None and self.sampler_held_open is False:
self.sampler_held_open = True
self.sampler.system.open_ref()
utils.center_win(self.win, parent=self.parent)
self.sel_item(self.selected)
self.win.after(2, self.flow_items)