-1

私の問題を非常にひどく説明したようですが、ラベルのグリッド機能に問題があります。ラベルは表示されますが、その行/列を変更したり、括弧内で機能を実行したりすることはできません。

そこに問題を再現する方法のコードを入れました。.grid() 括弧内に何かを入れても、前述のように何もしません

from tkinter import *
root = Tk()

#To actually see that it does not work
root.geometry("800x600")

Var = StringVar()

Label = Label(root, textvariable=Var)

#Location of problem, adding stuff into the brackets does not change anything. For example: sticky = "ne"
Label.grid()

Var.set("Ha")

root.mainloop()
4

1 に答える 1