on oldest application to show records with xbrowse I used
1.) create the xbrowse with coordinates
2.) an array aBrowse where I inserted all fields, titles,pictures and sizes
3) then createfromsource comand
I make a small test
I convert EL-> into oElementi why now not run ok ? How I can to have the same ?
now I resolved with
I'd like to have the same schema also because I build the Xbrowse from an external class (tfsdi) with oApp():NewGrid( nSplit )
thanks
1.) create the xbrowse with coordinates
2.) an array aBrowse where I inserted all fields, titles,pictures and sizes
3) then createfromsource comand
I make a small test
#include "FiveWin.ch"
#include "xBrowse.ch"
static oElementi
REQUEST DBFCDX
REQUEST DBFFPT
EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO
Function test()
Local oDlg,oGrid
Local cDir:= ".\data\"
RddSetDefault( "DBFCDX" )
oElementi:=TDatabase():Open( , cDir+"Elementi", "DBFCDX", .T. )
oElementi:setorder(2)
oElementi:gotop()
define dialog oDlg size 600,400
oGrid := TXBrowse():New(oDlg )
oGrid:nTop := 00
oGrid:nLeft := 10
oGrid:nBottom := 200
oGrid:nRight := 400
aBrowse := { { { || oElementi:ELATTIVO }, i18n("Attivo"),80, },;
{ { || oElementi:ELNOME }, i18n("Descrizione elemento"),80, },;
{ { || "" }, i18n("Colore "),80, },;
{ { || oElementi:ELCOLORE }, i18n("Descr. Colore"),80, },;
{ { || oElementi:ELORDINE }, i18n("Ordine"),80, },;
{ { || oElementi:ELLOCK }, i18n("Bloccato"),200, }}
FOR i := 1 TO Len(aBrowse)
oCol := oGrid:AddCol()
oCol:bEditValue := aBrowse[ i, 1 ]
oCol:cHeader := aBrowse[ i, 2 ]
oCol:nWidth := aBrowse[ i, 3 ]
if !Empty(aBrowse[ i, 4 ])
oCol:cEditPicture:=aBrowse[ i, 4 ]
Endif
NEXT
WITH OBJECT oGrid
:CreateFromCode()
END
activate dialog oDlg
return nilI convert EL-> into oElementi why now not run ok ? How I can to have the same ?
now I resolved with
@0,nSplit+2 XBROWSE oApp:oGrid SIZE oApp():oDlg:nGridBottom,oApp():oDlg:nGridRight PIXEL OF oApp():oDlg ;
COLUMNS "ELATTIVO","ELNOME","","ELCOLORE","ELORDINE","ELLOCK";
HEADERS "Attivo","Descrizione elemento","Colore ", "Descr. Colore","Ordine","Bloccato";
COLSIZES 80,80,80,80,80,80 ;
CELL LINES NOBORDER ;
DATASOURCE oElementiI'd like to have the same schema also because I build the Xbrowse from an external class (tfsdi) with oApp():NewGrid( nSplit )
thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
