and I use a listbox to insert the oTree
oLbxTree:SetTree( oTree )
How I can make to found the nlevel for this obxTree
I 'm converting a oldest fw /clipper app where I used
nLevel:= oLbxTree:cargo:nLevel
but now with fwh this not run !!!
I have this BuildTree :
- Code: Select all Expand view
Function BuildTree( oTree, oLbxTree )
oTree:= TreeBegin( "Folder1","Folder2","Folder3")
DO WHILE ! PROVVE->(Eof())
_TreeItem (AllTrim (PROVVE->CODAZI)+"."+PROVVE->DENSOC, "DBFs",,,, .F.)
TreeBegin(,)
PROVVE->(dbSkip())
DO WHILE LEN(AllTrim(PROVVE->CODAZI)) == 2 .AND. ! PROVVE->(Eof())
_TreeItem (AllTrim (PROVVE->CODAZI)+"."+PROVVE->DENSOC, "DBFs",,,, .F.)
*_TreeItem (PROVVE->DENSOC, "DBFs",,,, .F.)
TreeBegin(, )
PROVVE->(dbSkip())
DO WHILE LEN(AllTrim(PROVVE->CODAZI)) == 3 .AND. ! PROVVE->(Eof())
_TreeItem (AllTrim (PROVVE->CODAZI)+"."+PROVVE->DENSOC, "LIB",,,, .F.)
*_TreeItem (PROVVE->DENSOC, "LIB",,,, .F.)
TreeBegin(, )
PROVVE->(dbSkip())
DO WHILE LEN(AllTrim(PROVVE->CODAZI)) >= 4 .AND. ! PROVVE->(Eof())
* IF LEN(AllTrim(PROVVE->CODAZI)) >= 4
_TreeItem (AllTrim (PROVVE->CODAZI)+"."+PROVVE->DENSOC, "LOB",,,, .F.)
*_TreeItem (PROVVE->DENSOC, "LOB",,,, .F.)
* ENDIF
PROVVE->(dbSkip())
ENDDO
TreeEnd()
ENDDO
TreeEnd()
ENDDO
TreeEnd()
ENDDO
TreeEnd()
oTree:Expand()
oLbxTree:SetTree( oTree )
return nil
how I can to converte it on Xbrowse ?