Color of the oTree

Color of the oTree

Postby Natter » Sat May 16, 2020 7:37 pm

Hi,

Can I change the color and font of the oTree object in xBbrowse ?
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Color of the oTree

Postby nageswaragunupudi » Sun May 17, 2020 5:11 am

You can use codeblocks for colors and fonts based on oBrw:oTreeItem:nLevel or any other datas of oBrw:oTreeItem
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Color of the oTree

Postby Natter » Sun May 17, 2020 6:14 am

Thanks. Please give a small example
Natter
 
Posts: 1120
Joined: Mon May 14, 2007 9:49 am

Re: Color of the oTree

Postby nageswaragunupudi » Sun May 17, 2020 6:51 am

Code: Select all  Expand view
oBrw:bClrStd := { || If( oBrw:oTreeItem:nLevel == 1, { ... }, { ... } ) }
oBrw:oDataFonts := { || If( oBrw:oTreeItem:nLevel == 1, oBold, oNormal ) }
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Color of the oTree

Postby Natter » Sun May 17, 2020 7:20 am

Works. Thanks. I color the row for ::otree:nlevel=1, but it would be more convenient to combine columns in this row. I tried using column merging from the XBRUSER.PRG example Everything works, but the column separators are visible :cry:
Natter
 
Posts: 1120
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 106 guests