本文整理汇总了Python中application.Application.add_toggle_window_event方法的典型用法代码示例。如果您正苦于以下问题:Python Application.add_toggle_window_event方法的具体用法?Python Application.add_toggle_window_event怎么用?Python Application.add_toggle_window_event使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类application.Application
的用法示例。
在下文中一共展示了Application.add_toggle_window_event方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import add_toggle_window_event [as 别名]
hbox.pack_start(sb1, False, False)
hbox.pack_start(sb2, False, False)
for i in range(10):
testmb = ompButton(None, 'aa', 'bb')
vbox.pack_start(testmb, False, False)
print i
# Add scrolled window.
scrolled_window = ScrolledWindow()
category_box.pack_start(vvbox, False, False)
vvbox.pack_start(scrolled_window, False, False)
vvbox.pack_start(hbox, False, False)
scrolled_window.add_child(vbox)
scrolled_window.set_size_request(160, 540)
# Add statusbar.
statusbar = Statusbar(36)
application.main_box.pack_start(statusbar.status_event_box, False)
application.add_move_window_event(statusbar.status_event_box)
application.add_toggle_window_event(statusbar.status_event_box)
# Run.
application.run()
示例2: Navigatebar
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import add_toggle_window_event [as 别名]
# Add navigatebar.
navigatebar = Navigatebar(
[("navigatebar/nav_recommend.png", "导航1", None),
("navigatebar/nav_repo.png", "导航2", None),
("navigatebar/nav_update.png", "导航3", None),
("navigatebar/nav_uninstall.png", "导航4", None),
("navigatebar/nav_download.png", "导航5", None),
("navigatebar/nav_repo.png", "导航6", None),
("navigatebar/nav_update.png", "导航7", None),
("navigatebar/nav_uninstall.png", "导航8", None),
]
)
application.main_box.pack_start(navigatebar.nav_event_box, False)
application.add_move_window_event(navigatebar.nav_event_box)
application.add_toggle_window_event(navigatebar.nav_event_box)
# Add body box.
body_box = gtk.HBox()
application.main_box.pack_start(body_box, True, True)
# Add categorybar.
# Note if you add list in categorybar make sure height is multiples of list length.
# Otherwise last one item will heighter than Otherwise items.
category_box = gtk.HBox()
body_box.add(category_box)
categorybar = Categorybar([
("categorybar/word.png", "测试分类", lambda : Tooltip("测试分类", 600, 400)),
("categorybar/win.png", "测试分类", None),
("categorybar/web.png", "测试分类", None),
("categorybar/professional.png", "测试分类", None),