Forgive the follow up on this post as I thought the Clipper colors with READONLY was fixed in 1202.
I went back and reviewed your example demonstrating your fix using code :
- Code: Select all Expand view
#include "FiveWin.ch"
function Main()
local oDlg, cTest := "Hello world"
TGet():lDisColors = .F.
DEFINE DIALOG oDlg
@ 2, 2 GET cTest COLORS "N/R" READONLY
@ 3, 10 BUTTON "Ok" ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
return nil
and this works fine in FWH1202 .. unfortunately it does not seem to work with resources .. I added the TGet():lDisColors = .F. in my example using resources with clipper colors and READONLY does not work as expected.
Please review the code and see if there is something I have missed ?
Thanks again
Rick Lipkin
- Code: Select all Expand view
// Main.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 )
TGet():lDisColors = .F. // readonly fix
// 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
REQVIEW DIALOG 33, 32, 220, 153
STYLE WS_POPUP | WS_CAPTION
CAPTION "Clipper colors Readonly with Resource"
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 w rgb", -1, 110, 15, 79, 9
LTEXT "Say Readonly Color w/n", -1, 110, 29, 90, 9
LTEXT "Get Readonly color n/r", -1, 110, 72, 90, 9
}