Tree on xBrowse

Post Reply
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Tree on xBrowse

Post by Natter »

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. ?
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Tree on xBrowse

Post by cnavarro »

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
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Tree on xBrowse

Post by Natter »

Thanks for your help, but I found the handling capabilities lclick/dblclick on Tree xBrose
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Tree on xBrowse

Post by Natter »

Thanks, understood - blDClickData
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Tree on xBrowse

Post by Natter »

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 ?
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Tree on xBrowse

Post by nageswaragunupudi »

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: Select all | Expand

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
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Tree on xBrowse

Post by Natter »

I tried AddBitmap and all the elements of the next level will appear the same icons, but I need different
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Tree on xBrowse

Post by nageswaragunupudi »

First, hope the issue of resources is clarified.

How to have different images for the last level.

Code: Select all | Expand


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
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: Tree on xBrowse

Post by Natter »

Understood, Mr.Rao, thank you !
Post Reply