Tree on xBrowse

Tree on xBrowse

Postby Natter » Thu Nov 10, 2016 1: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. ?
Natter
 
Posts: 1204
Joined: Mon May 14, 2007 9:49 am

Re: Tree on xBrowse

Postby cnavarro » Thu Nov 10, 2016 1: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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Tree on xBrowse

Postby Natter » Thu Nov 10, 2016 3:13 pm

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

Re: Tree on xBrowse

Postby Natter » Thu Nov 10, 2016 3:35 pm

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

Re: Tree on xBrowse

Postby Natter » Sat Nov 12, 2016 4: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 ?
Natter
 
Posts: 1204
Joined: Mon May 14, 2007 9:49 am

Re: Tree on xBrowse

Postby nageswaragunupudi » Sat Nov 12, 2016 4: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: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Tree on xBrowse

Postby Natter » Sat Nov 12, 2016 5:49 pm

I tried AddBitmap and all the elements of the next level will appear the same icons, but I need different
Natter
 
Posts: 1204
Joined: Mon May 14, 2007 9:49 am

Re: Tree on xBrowse

Postby nageswaragunupudi » Sat Nov 12, 2016 6:03 pm

First, hope the issue of resources is clarified.

How to have different images for the last level.

Code: Select all  Expand view

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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Tree on xBrowse

Postby Natter » Sat Nov 12, 2016 6:11 pm

Understood, Mr.Rao, thank you !
Natter
 
Posts: 1204
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 83 guests