本文整理汇总了Python中GUI.Window.show方法的典型用法代码示例。如果您正苦于以下问题:Python Window.show方法的具体用法?Python Window.show怎么用?Python Window.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GUI.Window
的用法示例。
在下文中一共展示了Window.show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: make_window
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def make_window(self, document):
win = Window(size = (400, 400), document = document)
view = AppView(model = document, extent = (1000, 1000), scrolling = 'hv', #menu_width = 50
#cursor = self.app_cursor
)
win.place(view, left = 0, top = 0, right = 0, bottom = 0, sticky = 'nsew')
win.show()
示例2: main
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def main():
win = Window()
view = PolyView(width=120, height=120)
win.add(view)
win.shrink_wrap()
win.show()
application().run()
示例3: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def test():
cursor = StdCursors.empty_cursor()
win = Window(title = "No Cursor", width = 500, height = 400)
view = TestDrawing(position = (20, 20), size = (300, 200),
cursor = cursor)
win.add(view)
win.show()
示例4: main
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def main():
f = None
args = sys.argv[1:]
if args:
fontsize = int(args[0])
sf = StdFonts.system_font
f = Font(sf.family, fontsize, sf.style)
#showfont("Using font", f)
win = Window(title = "Heights")
if f:
kwds = {'font': f}
else:
kwds = {}
controls = [
Label(text = "Label", **kwds),
TextField(text = "Text", **kwds),
CheckBox(title = "Check", **kwds),
RadioButton(title = "Radio", **kwds),
Slider(orient = 'h', width = 50),
#Button(title = "Button", **kwds),
]
#for ctl in controls:
# say("Height of %r is %s" % (ctl, ctl.height))
win.place_row(controls, left = 10, top = 10)
win.shrink_wrap(padding = (10, 10))
win.show()
run()
示例5: make_window
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def make_window():
win = Window(size = (240, 100), title = "Password")
tf = TextField(position = (20, 20), width = 200, password = True)
ok = Button("OK", position = (20, 60), action = (show, tf))
win.add(tf)
win.add(ok)
win.show()
示例6: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def test():
view = TestView(size = (300, 200))
win = Window(title = "Coloured Text")
win.add(view)
win.shrink_wrap()
win.show()
run()
示例7: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def test():
view = GearsView(size = (300, 300))
win = Window(title = "Gears")
win.place(view, sticky = "nsew")
view.become_target()
win.shrink_wrap()
win.show()
application().run()
示例8: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [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()
示例9: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [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()
示例10: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def test():
win = Window(title = "Targeting", size = (180, 100))
patch1 = TestPatch("Red patch", red, position = (20, 20))
patch2 = TestPatch("Green patch", green, position = (100, 20))
win.add(patch1)
win.add(patch2)
win.show()
application().run()
示例11: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def test():
doc = TestDoc(title = "Document")
view = TestDocView(model = doc, size = (200, 200))
win = Window(resizable = 0, size = (200, 200))
win.add(view)
win.document = doc
#say(view.x, view.y, view.width, view.height)
win.show()
application().run()
示例12: main
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def main():
view = CTV(size=(200, 300))
win = Window(title="Canvas")
win.add(view)
win.shrink_wrap()
view.become_target()
win.show()
app = application()
app.menus = basic_menus() + [test_menu]
app.run()
示例13: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def test():
win = Window(title = "Frame")
frm = Frame()
frm.place_column([
Label("This is"),
Label("A frame")],
left = 0, top = 0)
frm.shrink_wrap()
win.place(frm, left = 30, top = 30)
win.shrink_wrap(padding = (30, 30))
win.show()
示例14: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def test():
cursor = StdCursors.finger
win = Window(title = "Cursor", width = 500, height = 400)
view1 = TestDrawing(position = (20, 20), size = (100, 70), cursor = cursor)
view2 = TestScrollableView(position = (140, 20), size = (200, 200),
scrolling = 'hv')
view2.cursor = cursor
win.add(view1)
win.place(view2, sticky = 'nsew')
win.shrink_wrap((20, 20))
win.show()
示例15: test
# 需要导入模块: from GUI import Window [as 别名]
# 或者: from GUI.Window import show [as 别名]
def test():
app = application()
pixmap = GLPixmap(50, 50, double_buffer = False, alpha = False)
pixmap.with_context(draw_triangle, flush = True)
#pixmap.with_canvas(draw_circle)
view = PixmapTestView(pixmap, size = (180, 200))
win = Window(title = "GLPixmap", resizable = False)
win.add(view)
win.shrink_wrap()
win.show()
app.run()