[英]My program is running, but it is minimized
def Poland():
import turtle as t
t.bgcolor("black")
t.width(10)
t.color("white")
t.forward(50)
t.right(90)
t.penup()
t.forward(10)
t.right(90)
t.pendown()
t.color("red")
t.forward(50)
Z = eval(input("Your country: "))
if (Z == Poland):
Poland()
当我运行这个程序并用波兰回答“你的国家”问题时,它确实有效(它打开“Python Turtle Graphics”window 并绘制一个标志),但它被最小化了。 请帮忙。 我对此很陌生。
如果你想最大化海龟 window 只需使用:
t.Screen().cv._rootwindow.wm_state("zoomed")
或者
t.Screen().cv._rootwindow.state("zoomed")
这是有效的,因为海龟只不过是 tkinter window。
但是 window 将在后台播放。
在第一层弹出它:
t.Screen().cv._rootwindow.attributes("-topmost", True)
更多 tkinter 在海龟t.Screen().cv._rootwindow.here_comes_the_tkinter_window_command
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.