Re: Win32lib dialogs within proc's
- Posted by Irv Mullins <irv at ELLIJAY.COM> Mar 10, 2000
- 445 views
On Fri, 10 Mar 2000, you wrote: > > From: Of Irv Mullins > > > If you define your new window as modal, then it _can't_ go > > back until the user > > responds (and a closeWindow command is issued). That could be > > from a click or > > selection from a listbox or a button, or whatever. > > > > Irv > > > > Unfortunately, no. Maybe a true modal window would work this way, but not > in win32lib (I believe that modal windows are emulated?). While the window > doesn't go away, the program continues immediately after the window is > created, and the user never gets to do anything. By using another event > loop, the main flow of my program is halted until the user is done with the > dialog. I suspect that Windows does something similar in the case of > getOpenFileName (namely, creating it's own event loop). Actually, the > openWindow call in EventLoop() should probably use Modal. Or maybe wrap > that into openWindow(window, Modal) calls so it would behave like you > suggest. > > Unless anyone can figure out another way to do this using existing routines > in win32lib, I'd like to add this to the wishlist for David. Well, if your code sez: openWindow(win,Modal) puts(1,"Hello World") ....etc then of course it will open the window, and then continue with the next line. But that's just not good Windows event driven coding. Actually, it's not Windows coding at all. You can't write Windows programs like you write DOS programs. It just doesn't work that way. Regards, Irv