Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can BROWSE FIELDS window be attached to parent screen?

Status
Not open for further replies.

new777

Technical User
Mar 1, 2007
10
US
Hello everyone,

I'm trying to create a browse fields window attached to an existing parent window, but it would not work as expected. The parent window is a form with a few fields on the top and the bottom part suppose to hold the browse window. I would like to use browse to edit the data, add and delete records. Thank you in advance!
Code:
This is coded in SETUP screen of parent screen:
DEFINE WINDOW subcmpcs from 10,30 to 50,80  in window vndcmpcs;
  HALF FONT 'MS Sans Serif',8 NOCLOSE NOZOOM NOMIN COLOR RGB(,,,192,192,192)

BROWSE FIELDS date 		:H='Date'				,;
              capacity 	:H='Available Capacity'	 ;
              nowait window subcmpcs
              
ACTIVATE WINDOW subcmpcs in window vndcmpcs
 
cut the NOWAIT.
BROWSE FIELDS date :H='Date' ,;
capacity :H='Available Capacity' ;
window subcmpcs
 
Thanks for the responce! Doing that would not display the parent window and I need browse to be integrated into the parent window.
 
I've tried various combinations of Define, Browse and Activate with no luck. Actually, I got close once and Browse window was attached to the main one, but once code approached READ statement it just past by it making the screen just blink for a second. Is it possible I'm missing something in READ?
 
Can I ask if you really have to do this in FoxPro 2.x? This kind of stuff is so much easier in Visual FoxPro with the grid.

Tamar
 
Unfortunately, I have to do in 2.6.
 
Change the name XXXXX with the name of the screen that you want.

Now remember the parameter of browse function.
1.If you use Window XXXXX
The windows take the characteristics of the specified window
2.If you use In Windows xxxx
The window to look inside the open window mother
3.If you use IN Screen
It is possible to locate a window to consider explicitly in the active window
-----------------------------------
BROWSE FIELDS date :H='Date' ,;
capacity :H='Available Capacity' ;
window XXXXXX
-----------------------------------
BROWSE FIELDS date :H='Date' ,;
capacity :H='Available Capacity' ;
IN window XXXXXX
-----------------------------------
BROWSE FIELDS date :H='Date' ,;
capacity :H='Available Capacity' ;
IN Screen
-----------------------------------


Good Luck
 
Seems to me that it is not a problem with defining and displaying the window, but rather with READ/Release window statements. Once new Browse window gets displayed ok, the execution does not stop on Read statemnt and keeps going ahead until Release Window is reached and window closes. Would you know what causes this behaviour?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top