Acorn
Acorn

Reputation: 50597

wxPython - run function after GUI is fully drawn

What would be the standard way to do this?

I don't want there to be a delay when opening the program, but I want my function to run as soon as GUI has been drawn.

I've tried wx.CallAfter(foo.bar), the Window (Frame) opens immediately, but the buttons don't get drawn until my function has executed.

Upvotes: 0

Views: 927

Answers (1)

Acorn
Acorn

Reputation: 50597

wx.FutureCall(0, foo.bar)

This puts an event into the event queue that will call the function after 0 milliseconds.

This causes the function to be run as soon as GUI has been drawn.

Upvotes: 2

Related Questions