Reputation: 4983
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 my 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?
Upvotes: 0
Views: 241
Reputation: 11
In the __init__
( ) for your main frame put this:
wx.CallAfter( func_name )
Upvotes: 1
Reputation: 273884
In the main frame constructor set a one-shot timer with interval 0 that fires the event.
Upvotes: 1