如何让 Tkinter 窗口跳转到最上面?
为了让 Tkinter 窗口或根窗口跳到所有其它窗口上面,我们可以使用 attributes 方法,其通常需要两个值,指定“置顶”值,另一个是布尔值。
示例
#Importing the library
from tkinter import *
#Create an instance of tkinter window or frame
win= Tk()
#Setting the geometry of window
win.geometry("600x250")
#Create a Label
Label(win, text= "Hello Everyone!",font=('Helvetica bold',
15)).pack(pady=20)
#Make the window jump above all
win.attributes('-topmost',1)
win.mainloop()输出
运行上述代码将使窗口停留在所有其它窗口上面,

广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP