The CLASSDATA nClrGrayText was first provided in FWH1512. Extract from whatsnew.txt:
* Enhancement: Class TGet COLOR_GRAYTEXT constant use changed into a CLASSDATA
::nClrGrayText as per Tim Stone requirement
We verified once again and did not find any change in the behavior since FWH1512 till now.You assigned a value of 25 to TGet():nClrGrayText. GetSysColor(25) returns 0, i.e., CLR_BLACK which is the same as text color of normal Get. So, both disabled and normal Gets are displayed with the same colors, i.e., COLOR_BLACK/COLOR_WHITE. That must be the reason you did not notice the difference in the colors of disabled and normal Gets.
We can see the difference by assigning a different color, such as 16 (COLOR_BUTTONSHADOW).
Test program:
- Code: Select all Expand view RUN
#include "fivewin.ch"
function Main()
local oDlg, oFont, aGet[ 4 ]
local aVar := { "One ", "Two ", "Three ", "Four " }
SetGetColorFocus()
TGet():nClrGrayText := 16 // COLOR_BTNSHADOW
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE 300,200 PIXEL TRUEPIXEL FONT oFont
@ 20,50 GET aGet[ 1 ] VAR aVar[ 1 ] SIZE 200,26 PIXEL OF oDlg
@ 55,50 GET aGet[ 2 ] VAR aVar[ 2 ] SIZE 200,26 PIXEL OF oDlg READONLY
@ 90,50 GET aGet[ 3 ] VAR aVar[ 3 ] SIZE 200,26 PIXEL OF oDlg WHEN .F.
@ 125,50 GET aGet[ 4 ] VAR aVar[ 4 ] SIZE 200,26 PIXEL OF oDlg
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
The behaviour is exactly the same with every version of FWH from 1512 till now.