FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem With oTree
Posts: 222
Joined: Mon Jun 04, 2012 12:00 PM
Problem With oTree
Posted: Mon Jun 11, 2012 02:36 PM
I have this oTree

@ 0.2,0.2 TREE oTree OF oDlg SIZE 150,142 ;
BITMAPS { "SH_MATERIA","SH_PCLAVE" } ;
TREE STYLE nOr( TVS_HASLINES, TVS_HASBUTTONS, WS_VSCROLL )





I cannot see the vertical scroll od this otree ( made with Goran Savckic class)


ani Idea ?
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Problem With oTree
Posted: Tue Jun 12, 2012 08:13 AM

Silvio,

Why don't you use a Windows standard TreeView ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 222
Joined: Mon Jun 04, 2012 12:00 PM
Re: Problem With oTree
Posted: Tue Jun 12, 2012 09:50 AM
I don't Know.. perhaps i had problems in past...


I tried with treeview (fwh) but not run





Code (fw): Select all Collapse
Application
===========
   Path and name: C:\work\PRG\Family\main.Exe (32 bits)
   Size: 3,659,264 bytes
   Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6715)
   FiveWin  Version: FWHX 12.03
   Windows version: 5.1, Build 2600 Service Pack 2

   Time from start: 0 hours 0 mins 3 secs 
   Error occurred at: 12-06-2012, 12:09:43
   Error description: Error BASE/1066  Argument error: conditional
   Args:
     [   1] = A   { ... }

Stack Calls
===========
   Called from: .\source\classes\TTREEVIE.PRG => TTREEVIEW:NEW( 176 )




the code
Code (fw): Select all Collapse
 

...
@ 0, nSplit+2 TREE oApp():oGrid OF oApp():oDlg ;
      SIZE (oApp():oDlg:nWidth())/2, (oApp():oDlg:nHeight()-22)/2 PIXEL    ;
      BITMAPS { "SH_PCLAVE","SH_MATERIA"}  ;
      FONT oApp():oFont                ;
      TREE STYLE nOr( TVS_HASLINES, TVS_HASBUTTONS 


....

oLink := oTree:GetRoot()

   SELECT FR

   FR->(DbGoTop())

   DO WHILE ! FR->(EOF())
      if FR->FrN2 == 0
         oLink1 := oLink:AddLastChild(FR->FrTipo,Iif(FR->FrHoja,1,2),Iif(FR->FrHoja,1,2),.t.)
         oLink1:Cargo := Str(FR->Frn1,2)+Str(FR->Frn2,2)+Str(FR->Frn3,2)+Str(FR->Frn4,2)+Str(FR->Frn5,2)
      elseif FR->FrN3 == 0
         oLink2 := olink1:AddLastChild(FR->FrTipo,Iif(FR->FrHoja,1,2),Iif(FR->FrHoja,1,2),.t.)
         oLink2:Cargo := Str(FR->Frn1,2)+Str(FR->Frn2,2)+Str(FR->Frn3,2)+Str(FR->Frn4,2)+Str(FR->Frn5,2)
      elseif FR->FrN4 == 0
         oLink3 := olink2:AddLastChild(FR->FrTipo,Iif(FR->FrHoja,1,2),Iif(FR->FrHoja,1,2),.t.)
         oLink3:Cargo := Str(FR->Frn1,2)+Str(FR->Frn2,2)+Str(FR->Frn3,2)+Str(FR->Frn4,2)+Str(FR->Frn5,2)
      elseif FR->FrN5 == 0
         oLink4 := olink3:AddLastChild(FR->FrTipo,Iif(FR->FrHoja,1,2),Iif(FR->FrHoja,1,2),.t.)
         oLink4:Cargo := Str(FR->Frn1,2)+Str(FR->Frn2,2)+Str(FR->Frn3,2)+Str(FR->Frn4,2)+Str(FR->Frn5,2)
      else
         oLink5:= oLink4:AddLastChild(FR->FrTipo,Iif(FR->FrHoja,1,2),Iif(FR->FrHoja,1,2),.t.)
         oLink5:Cargo := Str(FR->Frn1,2)+Str(FR->Frn2,2)+Str(FR->Frn3,2)+Str(FR->Frn4,2)+Str(FR->Frn5,2)
      endif

      FR->(DbSkip())
   ENDDO

   oTree:UpdateTV()
   oTree:SetFocus()





I download this sample from http://cincomundos.wordpress.com/2005/0 ... f-con-fwh/
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Problem With oTree
Posted: Tue Jun 12, 2012 10:41 AM
Hello Silvio,
I have similar problems so I tried to find another way.
I use now 2 xBrowse to have a similar look.

Keep in mind that there will not be a TreeView in Metro Style too.

Best regards,
Otto

• There is no TreeView control provided for Metro style apps. I would recommend thinking through your design to see if there is a better way to achieve it than a TreeView. If not, then you would need to implement your own or use a 3rd party control.
--Rob
o Marked As Answer by Bob BaoMicrosoft Contingent Staff, Moderator Wednesday, December 07, 2011 8:58

before

after
Posts: 222
Joined: Mon Jun 04, 2012 12:00 PM
Re: Problem With oTree
Posted: Tue Jun 12, 2012 03:09 PM
I tried on window run ok












the same code on dialog make error on ws_scroll

perhaps there's an error on dialog system... ?
Posts: 222
Joined: Mon Jun 04, 2012 12:00 PM
Re: Problem With oTree
Posted: Tue Jun 12, 2012 04:29 PM

Antonio

Libreria original de Savkic Goran

is in .\samples\trees

Continue the discussion