by Rick Lipkin » Thu Jul 17, 2008 2:26 pm
Antonio
It appears the nCol is returning NIL for nClrText ( nClrPane works fiine ).. I am trapping the code block and evaluating nCol .. and the msginfo(ncol ) returns NIL in SelColorf()
Rick Lipkin
..
..
oLbx:nClrText = { | nCOL | SelColorF( nCOL, oRsRpt:Fields("row_color"):Value, "F" ) }
oLbx:nClrPane = { | nCOL | SelColorB( nCOL, oRsRpt:Fields("row_color"):Value, "B" ) }
..
//--------------------
Static Func SelColorB( nCOL, cCOLOR, cTYPE )
LOCAL nCOLOR := CLR_WHITE
DO CASE
CASE nCOL = 8 .and. cCOLOR = "GREEN" .and. cTYPE = "B"
nCOLOR := CLR_GREEN
CASE nCOL = 8 .and. cCOLOR = "YELLOW".and. cTYPE = "B"
nCOLOR := CLR_YELLOW
CASE nCOL = 8 .and. cCOLOR = "RED" .and. cTYPE = "B"
nCOLOR := CLR_RED
ENDCASE
RETURN( nCOLOR )
//--------------------
Static Func SelColorF( nCOL, cCOLOR, cTYPE )
LOCAL nCOLOR := CLR_BLACK
MSGINFO( nCOL ) // return NIL here
DO CASE
CASE nCOL = 8 .and. cCOLOR = "GREEN" .and. cTYPE = "F"
nCOLOR := CLR_WHITE
msginfo( nCOLOR )
CASE nCOL = 8 .and. cCOLOR = "YELLOW".and. cTYPE = "F"
nCOLOR := CLR_WHITE
CASE nCOL = 8 .and. cCOLOR = "RED" .and. cTYPE = "F"
nCOLOR := CLR_WHITE
ENDCASE
RETURN( nCOLOR )