[wxPython-users] calling function after gui drawn?

Lanier, Paul Paul.Lanier at analog.com
Sun Oct 1 11:45:00 PDT 2006


Try calling it via wx.CallAfter(func,arg1,arg2,...).  That will call it
after all the pending events (which should include the GUI creation)
have been processed.  If that doesn't quite get all the events in then
use wx.FutureCall to delay it a little to give the GUI time to create
and process events.

-Paul

-----Original Message-----
From: news [mailto:news at sea.gmane.org] On Behalf Of James Stone
Sent: Sunday, October 01, 2006 2:22 PM
To: wxpython-users at lists.wxwidgets.org
Subject: [wxPython-users] calling function after gui drawn?

Hi all,

I have a simple application which needs to contact a server every time
it starts up to update it's database. At the moment, the database access
is called in __init__ so it happens before the GUI is drawn. I was
wondering if there is some way to call a function after the GUI is up,
so that I can put information on download status in the GUI instead of
output to console?

Many thanks,

James


---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org




More information about the wxpython-users mailing list