位置:首页 > 软件操作教程 > 编程开发 > Python > 问题详情

Python显示文字

提问人:杨紫红发布时间:2020-11-19

import tkinter


tk=tkinter.Tk()

canvas = tkinter.Canvas(tk,width=500,height=500)

canvas.pack()


canvas.create_text(150, 150, text='He said, "It\'s my curse,',font=('Times', 15))

canvas.create_text(200, 200, text='But it could be worse,',font=('Helvetica', 20))

canvas.create_text(220, 250, text='My cousin rides round',font=('Courier', 22))

canvas.create_text(220, 300, text='on a goose."', font=('Courier', 30))

image.png

继续查找其他问题的答案?

相关视频回答
回复(0)
返回顶部