本文整理汇总了Python中GUI.Window.height方法的典型用法代码示例。如果您正苦于以下问题:Python Window.height方法的具体用法?Python Window.height怎么用?Python Window.height使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GUI.Window
的用法示例。
在下文中一共展示了Window.height方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RadioGroup
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import height [as 别名]
grp = RadioGroup(action = report)
y = 20
for i in range(0, 3):
rbtn = RadioButton(
position = (20, y),
title = labels[i],
group = grp,
value = i)
win.add(rbtn)
y = rbtn.bottom + 5
pbtn = Button(title = "Set to Chocolate",
position = (20, rbtn.bottom + 20),
action = set_to_chocolate)
win.add(pbtn)
win.height = pbtn.bottom + 20
win.show()
instructions = """
There should be three radio buttons, "Banana", "Chocolate" and "Strawberry",
and a "Set to Chocolate" button. All radio buttons should initially be off.
Turning any of the buttons on should turn the others off. Changes to the
setting should be reported.
"""
say(instructions)
application().run()