Color of the oTree

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

Color of the oTree

Post by Natter »

Hi,

Can I change the color and font of the oTree object in xBbrowse ?
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Color of the oTree

Post by nageswaragunupudi »

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

Re: Color of the oTree

Post by Natter »

Thanks. Please give a small example
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Color of the oTree

Post by nageswaragunupudi »

Code: Select all

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

G. N. Rao.
Hyderabad, India
Natter
Posts: 524
Joined: Mon May 14, 2007 9:49 am

Re: Color of the oTree

Post 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:
Post Reply