TBrowse & report objects in FiveWin.
TBrowse & report objects in FiveWin.
I'm new to FiveWin. I have a generic routine for browsing files in Clipper. I called it DbBrowse(nRow1, nCol1, nRow2, nCol2, aoColumns, ...). Basically I send the coordinates and the Columns (array) and that's it. How can I implement these using FiveWin ?
How can I implement a report with preview ? I need the simplest example of both (TBrowse & a report) using FiveWin. Thank you.
How can I implement a report with preview ? I need the simplest example of both (TBrowse & a report) using FiveWin. Thank you.
HunterEc:
There are many samples in C:\FW\Samples folder, I'm sure you
will find what you need.
Regards
There are many samples in C:\FW\Samples folder, I'm sure you
will find what you need.
Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
This is a simple way to create a browse:
A simple way to create a Report with preview:
Code: Select all
@ 1, 1 LISTBOX oLbx ;
FIELDS Clients->Name, AllTrim( Clients->Address ),;
Clients->Phone, Str( Clients->Age, 3 ) ;
HEADERS "Name", "Address", "Phone", "Age" ;
FIELDSIZES 222, 213, 58, 24 ;
SIZE 284, 137 OF oWnd
Code: Select all
#include "FiveWin.ch"
#include "report.ch"
function Main()
local oReport
USE TEST INDEX TEST NEW
REPORT oReport TITLE "*** My First Report ***" PREVIEW
COLUMN TITLE "St" DATA Test->State
COLUMN TITLE "First Name" DATA Test->First
COLUMN TITLE " Salary" DATA Test->Salary
END REPORT
oReport:CellView()
ACTIVATE REPORT oReport
CLOSE TEST
RETURN NIL
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg, oBrw
USE TEST
DEFINE DIALOG oDlg;
SIZE 800, 600
@ 0, 0 LISTBOX oBrw FIELDS
oBrw:bLine = &( "{ || { TEST -> last, TEST -> first } }" )
ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetControl( oBrw );
CENTER
CLOSE
RETURN NIL
Embedding the listbox in a window.
Enrico: thank you very much for your example. Now, how can I make this LISTBOX pop up when the user press, for example, F2 to activate a lookup window (which will be the listbox). Thank you.
Using DBFCDX
Enrico: if I use the Test file VIA DBFCDX in your example and REQUEST & link the library, the LISTBOX does not come up on screen. Any thoughts on this? Thank you.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Embedding the listbox in a window.
HunterEC wrote:Enrico: thank you very much for your example. Now, how can I make this LISTBOX pop up when the user press, for example, F2 to activate a lookup window (which will be the listbox). Thank you.
Code: Select all
SETKEY( VK_F2, { || YourLookUpFunction() } )
Code: Select all
oDlg:bKeyDown = { || If( GetKeyState( VK_F2 ), YourLookUpFunction(), ) }
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Using DBFCDX
HunterEC wrote:Enrico: if I use the Test file VIA DBFCDX in your example and REQUEST & link the library, the LISTBOX does not come up on screen. Any thoughts on this? Thank you.
Code: Select all
#include "Fivewin.ch"
REQUEST DBFCDX
FUNCTION MAIN()
LOCAL oDlg, oBrw
RDDSETDEFAULT( "DBFCDX" )
USE TEST
DEFINE DIALOG oDlg;
SIZE 800, 600
@ 0, 0 LISTBOX oBrw FIELDS
oBrw:bLine = &( "{ || { TEST -> last, TEST -> first } }" )
ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetControl( oBrw );
CENTER
CLOSE
RETURN NIL
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Using DBFCDX
Anyway, I agree with Antonio: 32 bit is the way to go. 16 bit is a dead platform.
EMG
EMG