📜  在 tkinter 中绘制箭头 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:11.634000             🧑  作者: Mango

代码示例1
import tkinter as tk

window = tk.Tk()

canvas = tk.Canvas(window)
canvas.pack()

#Tkinter has an arrow option in the create_line method. tk.Last specifies the position at which 
#the arrow is placed, in this case the last coordinate set of the line, hence "LAST".
canvas.create_line(0, 0, 200, 100, arrow=tk.LAST)  

window.mainloop()