开发者

wx.EVT_IDLE set custom waiting time

I'm currently using a binding to wx.EVT_IDLE to constantly redraw my scene. However I noticed this only redraws once every second. Is there any way to set the time it has to wait in order to consider an idle event to 0.1 sec or 0.01 sec?

开发者_如何学PythonRegards,

Bogdan


In your OnIdle(self, event) handler, you can use event.RequestMore() to keep generating idle events. This should allow you to redraw as fast as you can process the events. See http://www.wxpython.org/docs/api/wx.IdleEvent-class.html#RequestMore

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜