[wxPython] refresh wxPython dialog??

Hello,

I am using a wxPython dialog which starts a time consuming function (ca. 1-3
min.).
At this time the dialog do not refresh any controls, e.g. wxTextCtrl!!
How can I refresh this controls and make sure, that the cancel-button works
every time???

Have anybody an idea??

Regards
Rafael