位置:首頁 > 軟件操作教程 > 編程開發(fā) > Python > 問題詳情

Python顯示文字

提問人:楊紫紅發(fā)布時間: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

繼續(xù)查找其他問題的答案?

相關(guān)視頻回答
回復(fù)(0)
返回頂部