[wxPython-users] "De-coupling" user events
Robin Dunn
robin at alldunn.com
Mon Dec 3 12:09:14 PST 2007
Mark Erbaugh wrote:
> Maybe I haven't completely thought this through, is it possible to have
> a dialog that is modal only in relationship to a given frame in a
> multi-frame application.
>
> For example, say the user clicks on a 'process' button and the result of
> the processing needs to display a message dialog. They way I might do
> this is to write the processing code in direct response to the button
> click. This code would not return until the user dismisses the dialog.
> However, at this point the event loop is not sending events to other
> application frames, so they are 'dead' as far as the user is concerned.
>
> What I'd like to do is have the frame that launched the processing
> appear 'dead', but have other application frames still active. Until the
> user dismisses the dialog, the frame that launched the process is
> 'dead', but the user can freely interact with other frames.
>
> Where I see a need for this would be if the dialog asked the user a
> question for which the user needed to lookup other information in
> another frame of the application.
To phrase it a different way, you are looking for a way to make dialogs
be parent-modal instead of app-modal. This has been discussed in the
past, and we may eventually get support for that from wxWidgets, but
currently it can only reliably do app-modal dialogs. Stephen's
suggestion sounds like a reasonable alternative though. Perhaps we can
twist his arm a bit so he will make a recipe page in the wiki for it?
(hint, hint)
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list