nageswaragunupudi wrote:Please try this or similar code:
oBrw:bClrStd := { || If( oBrw:lActive, { CLR_BLACK, CLR_WHITE }, { CLR_WHITE, CLR_HGRAY } ) }
func BrwDisable( oBrw )
oBrw:SetColor( CLR_WHITE, CLR_HGRAY )
oBrw:Disable()
return nil
func BrwEnable( oBrw )
oBrw:SetColor( CLR_BLACK, CLR_WHITE )
oBrw:Enable()
oBrw:Refresh()
return nil
Now you can use BrwDisable and BrwEnable functions.
Thanks Nageswaragunupudi ,
I did
local lDimmed := .F.
...
 WITH OBJECT oBrw
     :bClrStd    := {|| IF( lDimmed, { nRGB(204,204,204) , nRGB(235,233,237) }, {CLR_BLACK, GetSysColor( COLOR_WINDOW )} ) }
     :bClrSel    := {|| IF( lDimmed, { nRGB(204,204,204) , nRGB(235,233,237) }, {CLR_BLACK, CLR_YELLOW} ) }
     :bClrSelFocus  := :bClrSel
     :bClrHeader   := {|| IF( lDimmed, { nRGB(204,204,204) , nRGB(235,233,237), nRGB(235,233,237), nRGB(235,233,237)},;
                                 { CLR_BLACK     , nRGB(196,225,255), nRGB(125,165,224), nRGB(203,225,252 )} ) }
     :bClrFooter   := :bClrHeader
END//with
...
then somewhere in code...
...
lDimmed := .T.
oBrw:Refresh(.T.)
oBrw:Disable()
...
It works fine... But I think yours is better simplified.
Dimming xBrowse when :disable() (Maybe), should be included in next xBrowse version. Just a thoughts.
Thank you!.