Vertical text in Tkinter Canvas

后端 未结 3 1444
梦毁少年i
梦毁少年i 2020-12-21 01:43

Is there a way to draw vertical text in Tkinter library? (Python recommended)

textID = w1.create_text(5, 5, anchor=\"nw\")
w1.itemconfig(textID, text = \"Thi         


        
3条回答
  •  一生所求
    2020-12-21 01:52

    Since people are being linked to this answer, I'll add an update.

    In tcl 8.6, the create_text method got an angle option. You can check your tcl version with Tkinter.TclVersion. If you have 8.6 or greater, you can use:

    textID = w1.create_text(5, 5, anchor="nw", angle=90)
    

提交回复
热议问题