dewey Cr 8
DEWDESCR cr 60
on dewey field I have a code sample 333.79 as you can see on this picture
the master category must be
000 Generalità
100 Filosofia e psicologia
200 Religione
300 Scienze sociali
400 Linguaggio
500 Scienze naturali e matematica
600 Tecnologia (Scienze applicate)
700 Le arti
800 Letteratura e retorica
900 Geografia e storia
how I can to create a xbrowse tree please
I tried this small test but not run
- Code: Select all Expand view
- #include "fivewin.ch"
#include "xbrowse.ch"
REQUEST DBFCDX
function main()
local oDlg, oFont, oBrw
local oTree
oTree := MakeTree()
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 350,500 PIXEL FONT oFont
@ 10,10 XBROWSE oBrw SIZE -10,-10 PIXEL OF oDlg ;
DATASOURCE oTree CELL LINES NOBORDER
oBrw:aCols[ 1 ]:AddBitmap( { FWDArrow(), FwRArrow(), "c:\fwh\bitmaps\16x16\new2.bmp" } )
oBrw:nStretchCol := 1
oBrw:CreateFromCode()
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
oTree:End()
return nil
static function MakeTree
field DEWEY,DEWDESCR
local oTree, n
USE DEWEY NEW SHARED
INDEX ON upper(DEWEY) TAG DEWEY TO TMP MEMORY
GO TOP
TREE oTree
do while ! eof()
n := DEWEY
TREEITEM (n)+" - "+DEWDESCR
TREE
do while DEWEY = n .and. ! eof()
TREEITEM DEWDESCR
SKIP
enddo
ENDTREE
enddo
ENDTREE
oTree:OpenAll()
return oTree