Enrico
Sorry for the late post .. first chance I have had to get back to this color column issue .. I looked at the samples brwcolor.prg .. however it does not use table fields and it is hard to interpret the array values ..
Here is my code .. I want to look at the last defined column and test for the value of "row_color" = "GREEN" to turn that column green.
The sample code turns the entire row green .. not just the last column .. using standard Twbrowse FWH class ..
Rick Lipkin
//----- Reporting tab
REDEFINE LISTBOX oLBX FIELDS ;
if(oRsRpt:eof, , oRsRpt:Fields("DATE_REPORTED"):Value),;
if(oRsRpt:eof,str(0,4) , str(oRsRpt:Fields("reporting_interval"):Value,4)),;
if(oRsRpt:eof, , oRsRpt:Fields("projmgr"):Value),;
if(oRsRpt:eof, , oRsRpt:Fields("start_date"):Value),;
if(oRsRpt:eof, , oRsRpt:Fields("end_date"):Value),;
if(oRsRpt:eof, , str(oRsRpt:Fields("est_budget"):Value,12,2)),;
if(oRsRpt:eof, , oRsRpt:Fields("final"):Value),;
if(oRsRpt:eof, , oRsRpt:Fields("row_color"):Value), ;
HEADERS "Date Rpt", ;
"Int", ;
"ProjMgr", ;
"StartDt", ;
"EndDt", ;
"EstBudt", ;
"Final", ;
"Status" ;
SIZES 80,40,80,80,80,90,50,70 ;
ID 111 of oFld1:aDialogs[1] ;
ON DBLCLICK( _Rptview(oRsRpt, oRsProj, "V", cPROJECTEID) ,;
oLbx:ReFresh(), ;
oLbx:SetFocus(), SysReFresh() );
UPDATE
IF .not. oRsRpt:eof
oLbx:bLogicLen := { || oRsRpt:RecordCount }
oLbx:bGoTop := { || oRsRpt:MoveFirst() }
oLbx:bGoBottom := { || oRsRpt:MoveLast() }
oLbx:bSkip := { | nSkip | Skipper( oRsRpt, nSkip ) }
oLbx:cAlias := "ARRAY"
oLbx:nClrPane = { | nCOL | if( oRsRpt:Fields("row_color"):Value = "GREEN", CLR_GREEN, CLR_WHITE ) }
ENDIF