I have two simple fields I want to setcolor to ??? ( grey out ) when the top checkbox is .t.
I have two onclick functions that blank out the fields and because of the when clause on the get .. they are disabled when the top checkbox is .t. .. but I can not seem to set the background color of the two disabled get fields to grey .. here is my code .. Checkfield1() seems to be the right place .. and I use oXXX:Setcolor("w/n") but the field does not grey out .. Color only seems to effect active get .. Is there a code block to set the color or to set the field to readonly and grey out the two fields ?
- Code: Select all Expand view
REDEFINE CHECKBOX oCBX_LINK var lCBX_LINK ID 114 of oEMPL ;
when lCBX_HTML <> .t. ;
On Click _ChkField1(lCBX_LINK) UPDATE
REDEFINE CHECKBOX oCBX_HTML var lCBX_HTML ID 119 of oEMPL ;
when lCBX_LINK <> .t. ;
On Click _ChkField2(lCBX_HTML) UPDATE
REDEFINE GET oHBD VAR cHBD ID 120 of oEMPL ;
when lCBX_HTML = .t. UPDATE
REDEFINE GET oHSD VAR cHSD ID 121 of oEMPL ;
when lCBX_HTML = .t. UPDATE
//--------------------------------
Static Func _ChkField1( lClick )
msginfo( "chkfield1")
MSGINFO( LCLICK )
DO CASE
CASE lCLICK = .T.
MSGINFO( "CLICK = T SETTING FIELDS TO GREY")
* lCBX_HTML := .F.
cHBD := SPACE(50)
cHSD := SPACE(50)
* oCBX_HTML:ReFresh()
oHBD:Disable()
msginfo( "disable")
oHBD:Setcolor("r/r")
msginfo( "color")
oHBD:ReFresh()
* oHSD:Setcolor("W/N")
oHSD:ReFresh()
CASE lClick = .f.
lCBX_LINK := .F.
oCBX_LINK:ReFresh()
* lCBX_HTML := .F.
cHBD := SPACE(50)
cHSD := SPACE(50)
* oCBX_HTML:ReFresh()
oHBD:ReFresh()
oHSD:ReFresh()
ENDCASE
SysReFresh()
RETURN(.T.)
//--------------------------------
Static Func _ChkField2( lClick )
IF lClick = .f.
lCBX_HTML := .F.
cHBD := SPACE(50)
cHSD := SPACE(50)
oCBX_HTML:ReFresh()
* oHBD:Setcolor("n/w")
oHBD:ReFresh()
* oHSD:Setcolor("n/w")
oHSD:ReFresh()
ENDIF
SysReFresh()
RETURN(.T.)