Here is a one line program:
- Code: Select all Expand view
- #include "FiveWin.Ch"
#include "xbrowse.ch"
function Main()
XBROWSER '\fwh\samples\customer.dbf' SETUP oBrw:bRClicked := { | r,c,f,oBrw | XBrowse( oBrw ) }
return ( 0 )
This one line code opens the dbf file, sets up the browse and closes the file after done. By default, it provides report and excel export functionality. Other clauses of XBROWSER command together with the SETUP clause give us almost total control on the browse.
Whats more interesting is the capability of Xbrowse() function to browse DATA of any object.
Here is the screen shot: As expected, we see a browse of customer table.
Now let us right click anywhere on the browse. We now see a simple object inspector like browse of oBrw object. Here is the screen shot.
Now go to the value column of aCols DATA and double cloick. We see an array of TXBRWCOLUMN objects
Now again double click on any row. We see object inspector of the Column Object
Try going to the value of cHeader and edit the value modifying as 'NAME'. Then close all the sub-browses. You will find the new heading in the main browse.
Not that this capability can be used to release any features in the production application. But this function can be used as a good tool during development.