Page 1 of 1

Color of the oTree

Posted: Sat May 16, 2020 7:37 pm
by Natter
Hi,

Can I change the color and font of the oTree object in xBbrowse ?

Re: Color of the oTree

Posted: Sun May 17, 2020 5:11 am
by nageswaragunupudi
You can use codeblocks for colors and fonts based on oBrw:oTreeItem:nLevel or any other datas of oBrw:oTreeItem

Re: Color of the oTree

Posted: Sun May 17, 2020 6:14 am
by Natter
Thanks. Please give a small example

Re: Color of the oTree

Posted: Sun May 17, 2020 6:51 am
by nageswaragunupudi

Code: Select all

oBrw:bClrStd := { || If( oBrw:oTreeItem:nLevel == 1, { ... }, { ... } ) }
oBrw:oDataFonts := { || If( oBrw:oTreeItem:nLevel == 1, oBold, oNormal ) }
 

Re: Color of the oTree

Posted: Sun May 17, 2020 7:20 am
by Natter
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: