本文整理匯總了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)