1. multiple windows help

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

new topic     » topic index » view message » categorize

2. Re: multiple windows help

----- 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

new topic     » goto parent     » topic index » view message » categorize

3. Re: multiple windows help

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: multiple windows help

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
> 
> 
> 
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu