oTree

oTree

Postby Silvio.Falconi » Sun Mar 17, 2013 6:50 pm

If I have object oTree
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 ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 95 guests