wxPython wx.CallAfter - how do I get it to execute immediately?

前端 未结 2 1900
悲&欢浪女
悲&欢浪女 2021-01-23 01:13

When I execute a function with wx.CallAfter, inside it a variable is set. I want to be able to get the value of that variable on the next line, however CallAfter seems to execut

2条回答
  •  佛祖请我去吃肉
    2021-01-23 01:49

    Did you try Google? I did and I got several ideas. See the following thread:

    • http://wxpython-users.1045709.n5.nabble.com/process-window-Destroy-td2301944.html

    Try wx.WakeUpIdle() or wx.GetApp().ProcessIdle(). I also noticed in the docs that there is a ProcessPendingEvents method for wx.App, so you could also try wx.Getapp().ProcessPendingEvents() too.

提交回复
热议问题