terry <tg...@ci...>:
>
>
> Hello,
>
> In the type of business applications I usually develop, I have
> need to open an application (not a standard dialog type) window
> which the user must deal with before continuing with the main
> window. I'm used to dealing with this in VB/Access by simply
> stating that the second window is modal and the first window
> becomes 'dead' to the user.
>
> I've been playing around with AnyGUI using threads and forking,
> but have not come across any mechanism to accomplish this other
> than to disable all of the controls on the first window. I've
> also noticed that many of the X programs I use don't seem to
> implement this concept even when I think it might be a reasonable
> approach to control the application.
>
> How should (will) I handle this using AnyGUI?
I hadn't thought about implementing this, but it seems it might be
useful. It may be that it would require some serious hacking in some
of the backends (if they don't support this sort of thing)...
Anyway, if we do implement it, I think perhaps using the "enabled"
attribute of the given window might be a natural way of doing it. I.e.
new_win = Window(title='dialogish window thingy')
old_win.enabled = 0
app.add(new_win)
And then set old_win.enabled = 1 in the code dealing with the new
window. (Of course some utility class or something could be created to
deal with the normal case of "modal windows" here, perhaps.)
I can't guarantee that this will be done in release 0.2, though (and
maybe not even 0.3) since I haven't looked into how hard it would be
to implement in the various backends.
What you could do while working with 0.1 (which doesn't have anything
like this) is to create some central mechanism for all your event
handlers (i.e. an instance with lots of event-handling methods). This
mechanism could then be told which windows were allowed to perform
actions and which weren't -- or something. (Not ideal, certainly...)
Anyway, I'll add this to the TODO list :)
> Thanks,
>
> terry
--
Magnus Lie Hetland The Anygui Project
http://hetland.org http://anygui.org
|