本文整理汇总了Python中GUI.Window.place_column方法的典型用法代码示例。如果您正苦于以下问题:Python Window.place_column方法的具体用法?Python Window.place_column怎么用?Python Window.place_column使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GUI.Window
的用法示例。
在下文中一共展示了Window.place_column方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import place_column [as 别名]
def test():
win = Window(title = "Exceptions", size = (200, 100))
but1 = Button("ApplicationError", action = raise_application_error)
but2 = Button("Exception", action = raise_exception)
win.place_column([but1, but2], left = 20, top = 20)
win.shrink_wrap(padding = (20, 20))
win.show()
application().run()
示例2: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import place_column [as 别名]
def test():
starter = Button("Start", action = start_task)
stopper = Button("Stop", action = stop_task)
win = Window(title = "Tasks")
win.place_column([starter, stopper], left = 20, top = 20, spacing = 20)
win.shrink_wrap(padding = (20, 20))
win.show()
application().run()
示例3: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import place_column [as 别名]
def test():
def select():
i = group.value
name = cursor_names[i]
say("Selecting cursor no. %d (%s)" % (i, name))
cursor = getattr(StdCursors, name)
say("...", cursor)
view.cursor = cursor
win = Window(title = "Std Cursors")
view = TestArea(size = (100, 100))
win.place(view, left = 20, top = 20)
group = RadioGroup(action = select)
for i, name in enumerate(cursor_names):
group.add_item(RadioButton(title = name, value = i))
win.place_column(group, left = view + 20, top = 20, spacing = 0)
win.shrink_wrap((20, 20))
win.show()
application().run()
示例4: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import place_column [as 别名]
def test(orient, pos, pad):
win = Window(title = "%s Sliders" % orient.upper(), position = pos,
auto_position = False)
sliders = []
if 1:
#say("Creating slider 1")
sl1 = sl2 = sl3 = None
sl1 = Slider(orient = orient, max_value = 100)
sl1.action = slid(sl1, orient, 1)
sliders.append(sl1)
if 1:
#say("Creating slider 2")
sl2 = Slider(orient = orient, max_value = 100, ticks = 6, live = False)
sl2.value = 50
sl2.action = slid(sl2, orient, 2)
sliders.append(sl2)
if 1:
#say("Creating slider 3")
sl3 = Slider(orient = orient, max_value = 100, ticks = 6, discrete = True)
sl3.value = 100
sl3.action = slid(sl3, orient, 3)
sliders.append(sl3)
#say("Created sliders")
if orient == 'h':
win.place_column(sliders, left = 20, top = 20, spacing = 20, sticky = 'ew')
if sl2:
sl2.vstretch = True
if sl3:
sl3.vmove = True
else:
win.place_row(sliders, left = 20, top = 20, spacing = 20, sticky = 'ns')
if sl2:
sl2.hstretch = True
if sl3:
sl3.hmove = True
#say("Placed sliders")
win.shrink_wrap()
win.show()
示例5: Button
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import place_column [as 别名]
rb.append(RadioButton(kind.capitalize(), value=kind, group=rg))
rg.set_value("stop")
pb = [
Button(title="Alert", action=do_alert),
Button(title="Alert2", action=do_alert2),
Button(title="Alert3", action=do_alert3),
]
pb2 = [
Button("Note Alert", action=do_note_alert),
Button("Stop Alert", action=do_stop_alert),
Button("Ask", action=do_ask),
Button("Confirm", action=do_confirm),
Button("Ask or Cancel", action=do_ask_or_cancel),
Button("Confirm or Cancel", action=do_confirm_or_cancel),
]
win.place_column(pb, left=20, top=20)
win.place_column(rb, left=pb[2] + 20, top=20)
win.place_column(pb2, left=rb[1].right + 20, top=20)
win.size = (pb2[-1].right + 20, pb2[-1].bottom + 20)
win.show()
instructions = """
This lets you play around with the various standard dialog functions.
Consult the documentation for details of how they should behave. Check
that appropriate icons are displayed for the different flavours according
to platform conventions.
"""
say(instructions)
application().run()