Tkinter label textvariable not changing

前端 未结 1 1663
暗喜
暗喜 2021-01-26 10:04

I read 4 entry boxes and store them as 4 elements of a matrix (numpy), then when a button is clicked, a function (convert) runs and a matrix is stored in z (z is declared as glo

1条回答
  •  清歌不尽
    2021-01-26 10:39

    You can't use a normal variable as a textvariable. It must be an instance of one of the special tkinter variables (eg: StringVar). To cause the label to update you could then call the set method of that variable.

    0 讨论(0)
提交回复
热议问题