1. multiple windows help
- Posted by George Walters <gwalters at sc.rr.com> Jun 05, 2002
- 393 views
I need a hint on the following: 1. I need to open a window and collect some information on how the program is to run. i.e dates, from-to information, etc. 2. Then with this information I need to close this window, open the 2nd window and run the procedure to fill the window per the info collected from 1. I can do this if item 1 is programA that then launches programB with arguments, but I would like to do it all within the same program. george
2. Re: multiple windows help
- Posted by euman at bellsouth.net Jun 05, 2002
- 398 views
----- Original Message ----- From: "George Walters" <gwalters at sc.rr.com> > > I need a hint on the following: > > 1. I need to open a window and collect some information on how the program > is to run. i.e dates, from-to information, etc. > > 2. Then with this information I need to close this window, open the 2nd > window and run the procedure to fill the window per the info collected from > 1. > > I can do this if item 1 is programA that then launches programB with > arguments, but I would like to do it all within the same program. > > george Hello George, I use the (below) routine in my programs to keep only one window/control visible at any one given time. Keep in mind this is a very simple demo. -------- include win32lib.ew constant Window1 = create( Window, "Win 1", 0, 30, 30, 175, 100, 0 ), Window2 = create( Window, "Win 2", 0, 30, 30, 175, 100, 0 ), Open1 = create( PushButton, "Open Win 2", Window1, 16, 40, 100, 22, 0 ), Open2 = create( PushButton, "Open Win 1", Window2, 16, 40, 100, 22, 0 ) -- Set top Control/Window --------------------------------------------- global sequence Controls Controls = {Window1,Window2} global procedure SetVisibility(atom nowVisible) integer len, handle object junk len = length(Controls) for x = 1 to len do handle = getHandle(Controls[x]) if w32Func( xIsWindowVisible, {handle}) then if Controls[x] = nowVisible then exit else setVisible(Controls[x], 0) end if end if if x = len then setVisible(nowVisible, 1) end if end for end procedure procedure OpenWin2() SetVisibility(Window2) end procedure onClick[Open1] = routine_id( "OpenWin2" ) procedure OpenWin1() SetVisibility(Window1) end procedure onClick[Open2] = routine_id( "OpenWin1" ) SetVisibility(Window1) WinMain( Window1, Normal ) ------- Hopefully helpfull, Euman
3. Re: multiple windows help
- Posted by Sabal.Mike at notations.com Jun 05, 2002
- 406 views
This is fairly simple to do with one program. You will need to define two windows: a regular window and a child dialog window. Open the main window first as Normal, and open the dialog second as Modal. In your onClick_OKButton procedure, close the modal dialog and call the routine that populates the client area of the main window. HTH, Michael J. Sabal >>> gwalters at sc.rr.com 06/05/02 02:31PM >>> I need a hint on the following: 1. I need to open a window and collect some information on how the program is to run. i.e dates, from-to information, etc. 2. Then with this information I need to close this window, open the 2nd window and run the procedure to fill the window per the info collected from 1. I can do this if item 1 is programA that then launches programB with arguments, but I would like to do it all within the same program. george
4. Re: multiple windows help
- Posted by George Walters <gwalters at sc.rr.com> Jun 05, 2002
- 396 views
Thanks, matt that looks interesting... george ----- Original Message ----- From: "Matthew Lewis" <matthewwalkerlewis at YAHOO.COM> To: "EUforum" <EUforum at topica.com> Subject: RE: multiple windows help > > > > > -----Original Message----- > > From: George Walters [mailto:gwalters at sc.rr.com] > > > I need a hint on the following: > > > > 1. I need to open a window and collect some information on > > how the program > > is to run. i.e dates, from-to information, etc. > > > > 2. Then with this information I need to close this window, > > open the 2nd > > window and run the procedure to fill the window per the info > > collected from > > 1. > > > > I can do this if item 1 is programA that then launches programB with > > arguments, but I would like to do it all within the same program. > > Use openDialog() in win32lib. > > Matt Lewis > > > >