With FWH 1201 .. I have noticed that using the READONLY clause on a Get or Say does not respect the COLOR attributes in this case using a resource .. I did not try by code.
Rick Lipkin
Consider this Sample
- Code: Select all Expand view RUN
// ReqView.prg
//
//
#INCLUDE "FIVEWIN.CH"
STATIC oEntryBy,oEntryDate
STATIC cEntryBy,dEntryDate
STATIC oStock,cStock,oReq
//-------------------------------
FUNC Main()
LOCAL SAYING,cTITLE,lOK1,oBUTT1,oBUTT2
LOCAL nYear
SET DELETED on
SET CENTURY on
SET 3DLOOK on
nYEAR := ( year( DATE() )-30 )
SET EPOCH to ( nYEAR )
// global gradient
SetDlgGradient( { { .50, nRGB( 201, 217, 237 ), nRGB( 231, 242, 255 ) } } )
lOK := .F.
cEntryBy := "USER "
dEntryDate := Date()
cStock := "12345"
cTITLE := "Parts Request Information EDIT"
DEFINE DIALOG oREQ RESOURCE "REQVIEW" ;
TITLE cTITLE
// non tab stop
REDEFINE GET oEntryBy VAR cEntryBy ID 141 of oREQ COLOR CLR_WHITE, CLR_BLUE READONLY
REDEFINE Say oEntryDate VAR dEntryDate ID 142 of oREQ COLOR "N/W" READONLY
// tab stop
REDEFINE GET oStock VAR cStock ID 113 of oREQ COLOR "N/R" READONLY
REDEFINE BTNBMP oBUTT1 ID 111 of oREQ ; // ok
PROMPT "&Ok " LEFT 2007;
ACTION ( oREQ:END() )
REDEFINE BTNBMP oBUTT2 ID 112 of oREQ ; // cancel
PROMPT "&Cancel " LEFT 2007;
ACTION ( oREQ:END() )
ACTIVATE DIALOG oREQ centered
RETURN( Nil )
// end
.RC
- Code: Select all Expand view RUN
REQVIEW DIALOG 33, 32, 220, 153
STYLE WS_POPUP | WS_CAPTION
FONT 6, "MS Sans Serif"
{
LTEXT "No Tab Stop", -1, 9, 16, 30, 24
EDITTEXT 141, 45, 14, 57, 12, ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
EDITTEXT 142, 45, 28, 57, 12, ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
LTEXT "Tab Stop", -1, 9, 67, 26, 24
EDITTEXT 113, 46, 71, 57, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
CONTROL "&Ok", 111, "TBtnBmp", 32 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 123, 110, 41, 25
CONTROL "&Cancel", 112, "TBtnBmp", 32 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 169, 110, 41, 25
LTEXT "Get Readonly", -1, 110, 15, 55, 9
LTEXT "Say Readonly", -1, 110, 29, 55, 9
LTEXT "Get Readonly", -1, 110, 72, 55, 9
}