如何创建Tkinter任务栏



我正在使用repl.it(指向我的项目的链接(,我想创建一个任务栏,这样当用户点击它时,应用程序就会被调用。调用我正在使用的函数:

button = tk.Button(window, 
text="Text",
command=command
)

要创建任务栏,只需制作一个画布即可!

这是我使用的一些代码:

taskwidth = Desktop.winfo_screenwidth()
taskheight = Desktop.winfo_screenheight()
Port = Canvas(Desktop, height = 0.1 * (taskheight), width = taskwidth, bg = "skyblue", highlightthickness = 0)
Port.place(relx = 0.5, rely = 0.995, anchor = "center")

这将缩放到任何屏幕,并将转到底部。

希望这能有所帮助!

最新更新