I have to color the xbrowse cells on each line with a different color depending on the value of the cell, I made
WITH OBJECT oBrw
....
FOR i := 1 TO LEN(:aCols)
oCol := :aCols[ i ]
oCol:nWidth := 30
if i >1
oCol:bClrStd := {|i| { ChangeColor( oBrw, i ) } }
endif
NEXT
:CreateFromCode()
END
static function ChangeColor( oBrw, n )
return {|| { CLR_BLACK, ColorCell( oBrw:aRow[ n ]:VALUE ) } }
static function ColorCell( num )
local nColor := GetSysColor( 15 ) //for demo
local nColor1 := CLR_HGREEN
local nColor2 := CLR_HRED
local ncolor3 := GetSysColor( 15 )
/ IF num<3
nColor :=nColor1
elseif num>3
nColor := nColor2
elseif num<9
nColor := nColor3
endif/
return nColor
where is the error ?
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com


