accessing the return value of function that was bound to an event (tkinter)

后端 未结 3 1309
余生分开走
余生分开走 2021-01-14 09:27

Basically, what I\'ve done is bound a click event to a function. For example:

self.button1.bind(\"\",self.chooseDice)

What

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-14 09:50

    just add a self.result attribute to your class and set it at chooseDice()

提交回复
热议问题