[Python] tkinter changing the text on a label

self.labelText = 'change the value'

Above sentence make labelText to reference ‘change the value’, but not change depositLabel’s text.

To change depositLabel’s text, use one of following setences:

self.depositLabel['text'] = 'change the value'

OR

self.depositLabel.config(text='change the value')

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *