I have two column on a array but the second is an array
as you can see here
I need to colorize the last 5 element of the second column if are the same of first column
from
oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,2,3]
to
oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,2,7]
I made the xbrowse with
- Code: Select all Expand view RUN
- @ 90, 10 XBROWSE oBrw OF oDlgRitardo SIZE -10,-80 PIXEL NOBORDER AUTOSORT
oBrw:SetArray(aData,,,.F.)
SetupBrowserRit(oBrw)
proc SetupBrowserRit(oBrw)
local i
ADD COLUMN TO oBrw HEADER "Ambo" DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,1] } CENTER
ADD COLUMN TO oBrw HEADER "Ritardo" DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,2,1] } CENTER
ADD COLUMN TO oBrw HEADER "Estrazione" DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,2,2] } CENTER
ADD COLUMN TO oBrw HEADER "E1" DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,2,3] } CENTER
ADD COLUMN TO oBrw HEADER "E2" DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,2,4] } CENTER
ADD COLUMN TO oBrw HEADER "E3" DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,2,5] } CENTER
ADD COLUMN TO oBrw HEADER "E4" DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,2,6] } CENTER
ADD COLUMN TO oBrw HEADER "E5" DATA {|v,oCol| oCol:oBrw:aArrayData[oCol:oBrw:nArrayAt,2,7] } CENTER
WITH OBJECT oBrw
// SetGroupHeader( cGrpHdr, nFrom, nUpto, oFont, nAlign )
:SetGroupHeader( "Estratti", 4, 8 )
:nRowHeight := 22
:nClrBorder := CLR_GRAY
:lDrawBorder := .t.
:nColorBox := CLR_HRED
:nMarqueeStyle := MARQSTYLE_HIGHLWIN7
:lHscroll := .f.
:l2007 := .F.
:l2015 := .f.
:nStretchCol := STRETCHCOL_WIDEST
*:lAllowRowSizing := .F.
*:lAllowColSwapping := .F.
*:lAllowColHiding := .F.
:lRecordSelector := .F.
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_NOLINES
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:CreateFromCode()
FOR i := 1 TO LEN(:aCols)
oCol := :aCols[ i ]
oCol:nWidth := 30
oCol:bClrStd := ChangeColor( oBrw, i )
NEXT
:aCols[ 1 ]:nWidth := 30
:aCols[ 1 ]:nDataStrAlign := AL_LEFT
:aCols[ 2 ]:nWidth := 30
:aCols[ 3 ]:nWidth := 90
:aCols[ 4 ]:nWidth := 100
:SetStyle( 2018 )
end with
Return nil
static function ChangeColor( oBrw, n )
return {|| { CLR_BLACK, ColorCell( oBrw:aRow[ n ]) } }
But give me error