XXBROWSE.prg is a 3D FPW2.5/6 composite browse and data/control window inside a 3D container window.




*Copyright:
*Gordon Angus, 208 Canning Hwy, East Fremantle 6158, Western Australia
*1/November/1994 
angus@iinet.com.au


Disclaimer
Anyone who uses this product does so entirely at their own risk. No warranty either expressed or implied is made.
This product is under further development, but I have found it to
be very useful in its present form.


It is freely distributable for use on development or inhouse work. 
However, should you use it in either its current or modified form in any application for which a fee is charged (and payed!) then I would appreciate $1 for each time it is used in the application and the same again for each additional copy (or implementation) you sell of the application.





A typical call is:-


SELECT <database>

DO xxbrowse WITH <expN1>,<expN2>,<expN3>[,<expC1>[,<expC2>[,<expC3>]]]



where:

expN1= Depth of main (background) window in lines (of screen font) measured from the top, downwards.
Minimum=12 lines.	
Default = full screen depth.
	
expN2= Vertical depth of the top (@..Get, @..Say) window , in lines (of screen font) measured from the top of the 'main' window.
Minimum=5 lines. Maximum=main screen depth (expN1) less 7 lines.
Default= 0.4 x depth of 'container' window.

expN3= Width of 'main' window in columns (of screen font).
Minimum=15 columns.
Default=full screen width.

expC1= Title for top of 'container' window.

expC2= Comments etc for bottom of 'container' window.

expC3= Any combination of browse statement modifiers EXCEPT:-
	Window / In Window / Wait / Nowait / Save.




Because of a Foxpro restriction that I have not yet been able to avoid,  the total character length of the calling statement can only be 256 characters long.  To overcome this for long browse definitions and/or titles, the statement has to be split into segments shorter than 256 characters and then concatenated (so that the actual calling line:
'DO xxbrowse ...' is less than 256 characters.)

e.g.:
	xb1=" Title 'Any Length of Title' fields field1:w=wfield1()"
	xb2=" :v=vfield1():f, field2:h='New Title for Field 2':w=wfield2()"
	xb3=" :p='@!', field3 .......etc etc"
	etc
	etc
	DO xxbrowse with 25,12,75,'Headline','Footer', xb1+xb2+xb3+...
	
	
Typical calling statement:
   DO xxbrowse WITH 0,9,0, 'Data Entry', 'Comments etc.',;
   'title "Database: Stock" fields item :w=when1() :v=valid1(),;
   code :W=when2() :v=valid2(), rev:R, unit, qty,stock :W=.F.,;
   descript :W=.F.  FONT "times new roman",8'




Adding Objects to the general data entry (@..Get, @..Say) window:
To add objects to the data entry window,  include a procedure (named tw_xxxxx - see below) in the calling programme  and put all @..gets etc in it.
THE @...gets VARIABLES MUST BE DEFINED PUBLIC OR DEFINED IN THE CALLING PROGRAM, OTHERWISE A 'READ CYCLE - "VARIABLE NOT FOUND"' ERROR WILL OCCUR.  USING 'DEFAULT' WILL NOT WORK.

    Name the procedure 'tw_xxxxx'  where  xxxxx =:-
	
		a. the 1st 5 characters, (or up to the 1st blank if it comes earlier,) of the TITLE of the BROWSE (not the window!). (In the above two examples the names would be 'tw_any' and 'tw_datab').
		   
        or, (ONLY IF NO BROWSE TITLE IS DEFINED,):-
		   
		b. the 1st 5 characters (as above) of the ALIAS of the database being browsed.




Update:
The general data entry window automatically includes a button pair: OK/Cancel.
If you provide a procedure in the calling programme and name it:
'ok_xxxxx'  (where xxxxx=5 characters as above), OK (but not Cancel) will call it when leaving xxbrowse.



Demonstration:
A sample database and program is included for demonstration purposes.
The zip file contains:
	1.  xxbrowse.txt	This read-me file
	2.  xxbrowse.prg	The procedure file
	3.  xxtst.prg		The test program
	4.  xxtest.dbf		The test database