开发者

How to make a event run immediately after a GUI program starts in wxpython?

开发者 https://www.devze.com 2023-01-12 01:51 出处:网络
I\'m working on a GUI program in which I already bind a start button with one event, and when I click the start button, the event runs as I like. My question is, if I want m开发者_如何学Goy program to

I'm working on a GUI program in which I already bind a start button with one event, and when I click the start button, the event runs as I like. My question is, if I want m开发者_如何学Goy program to start the event immediately after the GUI program starts, which means the start button is immediately being "clicked" once the program starts, how do I do it?


In the main frame constructor set a one-shot timer with interval 0 that fires the event.


In the __init__( ) for your main frame put this:

wx.CallAfter( func_name )

0

精彩评论

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