Guys:
How can I change a cell color, based on a condition, in xBrowse ? For example if an amount is less than zero, change the whole amount the red color to bright white over red (on text would be "W+/R") ?
Thank you.
FUNCTION SHOW_VKEYS(cKey)
LOCAL cKeySearch := "? ", I := 1, nBRow := 1
LOCAL nKey := LEN(cKey)
DBSELECTAREA("VKEY")
DBGOTOP()
DO WHILE !EOF()
IF cKey = SUBSTR( VKEY->KEY1, 1, nKey)
cKeySearch := VKEY->VALUE1
nCPos := 1
nBRow := VKEY->(ORDKEYNO())
EXIT
ELSEIF cKey = SUBSTR( VKEY->KEY2, 1, nKey)
cKeySearch := VKEY->VALUE2
nCPos := 3
nBRow := VKEY->(ORDKEYNO())
EXIT
ELSEIF cKey = SUBSTR( VKEY->KEY3, 1, nKey)
cKeySearch := VKEY->VALUE3
nCPos := 5
nBRow := VKEY->(ORDKEYNO())
EXIT
ENDIF
DBSKIP(+1)
ENDDO
oBrw2:aCols[nCPos]:bClrstd := {|| { nBTColor1, If( nBRow = oBrw2:KeyNo(), nBCSELECT, nBColor1 ) } }
oBrw2:aCols[nCPos + 1]:bClrstd := {|| { nBTColor2, If( nBRow = oBrw2:KeyNo(), nBCSELECT, nBColor2 ) } }
RETURN ( cKeySearch )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 106 guests