如何创建 Tkinter 任务栏?

How to create a Tkinter taskbar?

我正在使用 repl.it(link to my project),我想创建一个任务栏,以便在用户单击它时调用该应用程序。调用我正在使用的函数:

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

要创建任务栏,只需制作 canvas!

这是我使用的一些代码:

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")

这会缩放到任何屏幕,并且会到达底部。

希望对您有所帮助!