组件描述
画布组件顾名思义,可以在上面进行图形的绘制操作
程序实现
代码(1)
import tkinter as tk
root = tk.Tk()
canvas =tk.Canvas(root, width=200, height=300)
canvas.pack()
line1 = canvas.create_line(0,50,200,50, fill='yellow')
line2 = canvas.create_line(100, 0, 100, 100, fill='red', dash=(4<