goosfancito wrote:esto tambien sucede cuando trabajas con tablas vacías. o me equivoco?
#include "fivewin.ch"
#include "xbrowse.ch"
#define BLANKLINE { Space(40), 0 }
function Main()
local oWnd, oBar, oBrw
DEFINE WINDOW oWnd
DEFINE BUTTONBAR oBar OF oWnd SIZE 100,32 2007
@ 0,0 XBROWSE oBrw COLUMNS 1, 2 ;
HEADERS 'String', 'Number' ;
COLSIZES 300, 100 ;
PICTURES nil, "99,999.99" ;
ARRAY {} CELL LINES FASTEDIT
oBrw:nEditTypes := EDIT_GET
oBrw:bPastEof := { || AAdd( oBrw:aArrayData, BLANKLINE ), oBrw:GoBottom(), oBrw:Refresh() }
oBrw:bKeyDown := { |nKey| If( nKey == VK_DELETE, ( ADel( oBrw:aArrayData, oBrw:nArrayAt, .t. ), ;
oBrw:Refresh() ), ;
If( nKey == VK_INSERT, ( AIns( oBrw:aArrayData, oBrw:nArrayAt, BLANKLINE, .t. ), ;
oBrw:Refresh() ), nil ) ) }
oBrw:CreateFromCode()
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd ON INIT oBrw:SetFocus()
return nil
Marcelo Via Giglio wrote:Mr. Rao,
what would be the correct definition when some column of the xBrowse come from other DBF (table),
by example I use my own function DBFIELDGET, proveedores -> ( DBFIELDGET( compra -> proveedor,"proveedor","nombre" ) ), to get the field from other table, in this case how can I define the column without use bStrData
regards
Marcelo
@ 0,0 XBROWSE oBrw OF oWnd ;
COLUMNS 'FIRST', 'CITY', 'SALARY * 1.1', 'STATE->STATE', 'DATE()-HIREDATE' ;
ALIAS 'CUSTOMER'
Marcelo Via Giglio wrote:I got the answer
XBROWSE oBrw......
HEADER ....
COLUMNS ...,{|| proveedores -> ( DBFIELDGET( compra -> proveedor,"proveedor","nombre" ) ) },........
Thanks
Regards
Marcelo
Marcelo Via Giglio wrote:Mr. Rao,
thanks for your answer, I am new with xBrowse and I can see this Browse is power-full.
I have a question, will be possible to use DBCOMBO like a COMBOBOX inside it to edit column ?
regards
Marcelo
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 61 guests