FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour SOLVED: xBrowse Tree bClrStd Not Working
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
SOLVED: xBrowse Tree bClrStd Not Working
Posted: Sat Apr 14, 2012 03:27 AM
This code works in array and rdd but not on tree

on array:
Code (fw): Select all Collapse
...
oBrw:bClrStd := {|| {CLR_BLACK, IF( oBrw:nArrayAt % 2 == 0, nRGB( 235, 235, 235 ), nRGB(251,253,255) ) }}
...


on rdd:
Code (fw): Select all Collapse
...
oBrw:bClrStd := {|| {CLR_BLACK, IF( (cAlias)->( RecNo() ) % 2 == 0, nRGB( 235, 235, 235 ), nRGB(251,253,255) ) }}
...


on tree: PROBLEM
Code (fw): Select all Collapse
...
oBrw:bClrStd := {|| {CLR_BLACK, IF( oBrw:oTreeItem:ItemNo() % 2 == 0, nRGB( 235, 235, 235 ), nRGB(251,253,255) ) }}
...


Maybe I got it wrong.. Any Idea?
Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: xBrowse Tree bClrStd Not Working
Posted: Mon Apr 16, 2012 05:16 AM
Code (fw): Select all Collapse
aClrCol:={ { 0, nRGB(192,221,255) }, { 0, nRGB(221,245,255) } } 

// Changing Alternative Row-Colors
oBrwGroups:bClrStd := { || aClrCol[ oBrwGroups:KeyNo % 2 + 1 ] }




Regards
Anser
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse Tree bClrStd Not Working
Posted: Mon Apr 16, 2012 06:03 AM

As Mr Anser suggested, the expression oBrw:KeyNo % 2 works for all browses, whether array, dbf, recordset, etc.
It is desirable to adopt this generic approach.

Regards



G. N. Rao.

Hyderabad, India
Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: xBrowse Tree bClrStd Not Working
Posted: Mon Apr 16, 2012 09:13 AM

Thanks Mr. RAO, Mr. Anser..

It works like a charm..

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15

Continue the discussion