本文整理匯總了Python中tk_tools.TK_ROOT.title方法的典型用法代碼示例。如果您正苦於以下問題:Python TK_ROOT.title方法的具體用法?Python TK_ROOT.title怎麽用?Python TK_ROOT.title使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類tk_tools.TK_ROOT
的用法示例。
在下文中一共展示了TK_ROOT.title方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: init_application
# 需要導入模塊: from tk_tools import TK_ROOT [as 別名]
# 或者: from tk_tools.TK_ROOT import title [as 別名]
def init_application():
"""Initialise the standalone application."""
global window
window = TK_ROOT
TK_ROOT.title(
_('BEEMOD {} - Backup / Restore Puzzles').format(utils.BEE_VERSION)
)
init()
UI['bar'] = bar = tk.Menu(TK_ROOT)
window.option_add('*tearOff', False)
gameMan.load()
ui_new_backup()
# UI.py isn't present, so we use this callback
gameMan.setgame_callback = load_game
if utils.MAC:
# Name is used to make this the special 'BEE2' menu item
file_menu = menus['file'] = tk.Menu(bar, name='apple')
else:
file_menu = menus['file'] = tk.Menu(bar)
file_menu.add_command(label=_('New Backup'), command=ui_new_backup)
file_menu.add_command(label=_('Open Backup'), command=ui_load_backup)
file_menu.add_command(label=_('Save Backup'), command=ui_save_backup)
file_menu.add_command(label=_('Save Backup As'), command=ui_save_backup_as)
bar.add_cascade(menu=file_menu, label=_('File'))
game_menu = menus['game'] = tk.Menu(bar)
game_menu.add_command(label=_('Add Game'), command=gameMan.add_game)
game_menu.add_command(label=_('Remove Game'), command=gameMan.remove_game)
game_menu.add_separator()
bar.add_cascade(menu=game_menu, label=_('Game'))
import helpMenu
# Add the 'Help' menu here too.
helpMenu.make_help_menu(bar)
window['menu'] = bar
gameMan.add_menu_opts(game_menu)
gameMan.game_menu = game_menu