FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Tree on xBrowse
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Tree on xBrowse
Posted: Thu Nov 10, 2016 01:10 PM

Hi, all !

oBrw:SetTree(Crt_Tre())

function Crt_Tre

TREE oTree
.....................
TREEITEM dim[st][2]
.....................
ENDTREE
return oTree

There xbrose with Tree. As the processing is done on the Tree lclick/dblclick/press Enter, etc. ?

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Tree on xBrowse
Posted: Thu Nov 10, 2016 01:48 PM
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Tree on xBrowse
Posted: Thu Nov 10, 2016 03:13 PM

Thanks for your help, but I found the handling capabilities lclick/dblclick on Tree xBrose

Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Tree on xBrowse
Posted: Thu Nov 10, 2016 03:35 PM

Thanks, understood - blDClickData

Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Tree on xBrowse
Posted: Sat Nov 12, 2016 04:15 PM

As the tree elements of one level to show the different icons ?
As the tree element is TTreeItem, then you need to specify hBmpOpen and hBmpClose. How can I get the hendler of icon from the resource ?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Tree on xBrowse
Posted: Sat Nov 12, 2016 04:46 PM
As the tree element is TTreeItem, then you need to specify hBmpOpen and hBmpClose.


NO

You can specify images for Open, Close, NoChild this way

Code (fw): Select all Collapse
oBrw:aCols[ 1 ]:AddBitmap( { <OpenImge>, <CloseImage>, <NoChildImage> } )

<OpenImage>, <CloseImage>, <NoChildImage> can be any of Bitmap file name, Any Image file name or Resource.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Tree on xBrowse
Posted: Sat Nov 12, 2016 05:49 PM

I tried AddBitmap and all the elements of the next level will appear the same icons, but I need different

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Tree on xBrowse
Posted: Sat Nov 12, 2016 06:03 PM
First, hope the issue of resources is clarified.

How to have different images for the last level.

Code (fw): Select all Collapse
oBrw:aCols[ 1 ]:AddBitmap( { <open>, <close>, <img3>, <img4>, .......... } )

oBrw:aCols[ 1 ]:bBmpData := { || If( oBrw:oTreeItem:oTree == nil, ;
                                 If( <cond1>, 3, If( <cond2>, 4 , 5 ) ), ; // This is the line for you to expand
                                 If( oBrw:oTreeItem:lOpened, 1 , 2 ) ) }
Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Tree on xBrowse
Posted: Sat Nov 12, 2016 06:11 PM

Understood, Mr.Rao, thank you !

Continue the discussion