Python tkinter label orientation
This is an issue I have also run into, and unfortunately there still is no simple angle argument for the tkinter Label
widget. Nevertheless, to work around this whilst allowing dynamic labels, you can use the create_text()
function within the tkinter canvas
, which does have an angle argument. An example snippet from my code:
canvas_1_manage = tkinter.Canvas(nodeManager.window, width = 12, height = 50)canvas_1_manage.grid(row = 0, column = 0)canvas_1_manage.create_text(6, 50, text = "Node", angle = 90, anchor = "w")
This is part of a window builder function which produces the following:nodeManager Window