Darrell
Here is some code to change one LINE background, forground based on the a value in a column :
- Code: Select all Expand view
oBrw:bClrStd := {|| {CLR_BLACK, if( oBrw:oRs:Fields("active"):Value = 'N', RGB(179,203,204), CLR_WHITE ) } }
If you have a fields that can have many results Rao suggested this code to me and it works quite nicely:
- Code: Select all Expand view
oBrw:oCol( "Last Status" ):bClrStd := ;
{ || HB_Decode( AllTrim( oBrw:oCol("Last Status"):value ), ;
"GREEN", { CLR_BLACK, CLR_HGREEN }, ;
"YELLOW", { CLR_BLACK, CLR_YELLOW }, ;
"RED", { CLR_WHITE, CLR_HRED } ) }
In the above code the column "Last Status" could be one of three values .. "GREEN", "YELLOW" or "RED" .. using the xHarbour HB_Decode function the code block will return the value of the field and assign your choice of colors to the COLUMN ( only )
Rick Lipkin