SOLVED: xBrowse Tree bClrStd Not Working

SOLVED: xBrowse Tree bClrStd Not Working

Postby fraxzi » Sat Apr 14, 2012 3:27 am

This code works in array and rdd but not on tree

on array:
Code: Select all  Expand view

...
oBrw:bClrStd := {|| {CLR_BLACK, IF( oBrw:nArrayAt % 2 == 0, nRGB( 235, 235, 235 ), nRGB(251,253,255) ) }}
...
 


on rdd:
Code: Select all  Expand view

...
oBrw:bClrStd := {|| {CLR_BLACK, IF( (cAlias)->( RecNo() ) % 2 == 0, nRGB( 235, 235, 235 ), nRGB(251,253,255) ) }}
...
 


on tree: PROBLEM
Code: Select all  Expand view

...
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?
Last edited by fraxzi on Tue Apr 17, 2012 1:09 am, edited 1 time in total.
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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xBrowse Tree bClrStd Not Working

Postby anserkk » Mon Apr 16, 2012 5:16 am

Code: Select all  Expand view
aClrCol:={ { 0, nRGB(192,221,255) }, { 0, nRGB(221,245,255) } }

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


Image

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: xBrowse Tree bClrStd Not Working

Postby nageswaragunupudi » Mon Apr 16, 2012 6: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
User avatar
nageswaragunupudi
 
Posts: 10632
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Tree bClrStd Not Working

Postby fraxzi » Mon Apr 16, 2012 9: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 97 guests