Basj wrote:
> Hello,
> I'm creating a dialog box "waiting" for an external trigger, before
> closing/destroying itself.
>
> When using :
> waitingdlg = wx.MessageDialog( ... )
> waitingdlg.ShowModal()
>
> I notice that I cannot destroy it from an external thread with
> waitingdlg.Destroy(). Why ?
This is an operating system limitation. Even from C++, there is no
(documented) method of forcing a modal message box to close.
(If you can get the window handle, you can send it a WM_CLOSE message,
but that's icky and system-dependent.)
> If so, it seems that I should redo all with a wx.Dialog : information
> icon, white background on the upper part of the dialog, grey
> background on the lower part of the dialog, main text, main buttons,
> bind buttons, etc. Moreover this will break the native look of the OS
> on some platforms...
Yes, but that's OK, because you are breaking the native BEHAVIOR as well.
--
Tim Roberts,
ti...@probo.com
Providenza & Boekelheide, Inc.