FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Color of the oTree
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Color of the oTree
Posted: Sat May 16, 2020 07:37 PM

Hi,

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

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Color of the oTree
Posted: Sun May 17, 2020 05: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
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Color of the oTree
Posted: Sun May 17, 2020 06:14 AM

Thanks. Please give a small example

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Color of the oTree
Posted: Sun May 17, 2020 06:51 AM
Code (fw): Select all Collapse
oBrw:bClrStd := { || If( oBrw:oTreeItem:nLevel == 1, { ... }, { ... } ) }
oBrw:oDataFonts := { || If( oBrw:oTreeItem:nLevel == 1, oBold, oNormal ) }
Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Color of the oTree
Posted: Sun May 17, 2020 07: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:

Continue the discussion