coloring alternate rows we can do
oBrw:bClrStd := { || { CLR_BLACK, If( oBrw:KeyNo % 2 == 0, nColor1, nColor2 ) } }
how can we color the columns alternately?
For a sample if I wish colorized only the 4th colomn I made
how can i not pass a specific column?
oBrw:bClrStd := { || { CLR_BLACK, If( oBrw:KeyNo % 2 == 0, nColor1, nColor2 ) } }
how can we color the columns alternately?
For a sample if I wish colorized only the 4th colomn I made
Function Alternate_Columns(nColor1,oBrw)
local aPos := { { 1, 4 }, { 2, 4 }, { 3, 4 }, { 4, 4 }, { 5, 4 }, { 6, 4 } }
local oCol
local nColor2:=CLR_WHITE
for each oCol in oBrw:aCols
oCol:bClrStd := GenClrBlock( oCol, aPos,nColor1,nColor2 )
next
oBrw:refresh()
return nil
static function GenClrBlock( oCol, aPos,nColor1,nColor2 )
local oBrw := oCol:oBrw
local nCol := oCol:nCreationOrder
local xCol
xCol := nCol // your calculation
return { || If( AScan( aPos, { |a| a[ 1 ] == oBrw:nArrayAt .and. a[ 2 ] == xCol } ) > 0, ;
{ CLR_WHITE, nColor1 }, { CLR_BLACK, nColor2 } ) }Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
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
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