I am slowly working thru and updating my applications to FWH 1201 and have noticed that my .rc forms Text has lost its transparency.
In FWH 910 I created a .rc form .. defined a brush and did a gradientfill over the dialog and that has worked just fine.
Also notice that the fields are no longer greyed out using COLOR "N/W" READONLY ..
I am sure it there is a new and better way to do this and any help in pointing out what I need to do to modify my code .. I would be most grateful.
Rick
Previous FWH
FWH 1201
- Code: Select all Expand view RUN
xGRAD8 := {{ .50, nRGB( 201, 217, 237 ), nRGB( 231, 242, 255 ) } }
DEFINE BRUSH oBrush FileName (cDefa+"\Icons\GREY.bmp")
DEFINE DIALOG oVND RESOURCE "VENDVIEW" ;
TITLE cTITLE BRUSH oBrush TRANSPARENT ;
IF cMODE = "A" .or. cMODE = "E"
REDEFINE GET oVENDORNO VAR cVENDORNO ID 110 of oVND COLOR "N/W" READONLY
REDEFINE GET oVENDOR VAR cVENDOR ID 120 of oVND PICTURE "@!" UPDATE
REDEFINE GET oADDR1 VAR cADDR1 ID 130 of oVND PICTURE "@!" UPDATE
REDEFINE GET oADDR2 VAR cADDR2 ID 113 of oVND PICTURE "@!" UPDATE
REDEFINE GET oCITY VAR cCITY ID 140 of oVND PICTURE "@!" UPDATE
REDEFINE GET oSTATE VAR cSTATE ID 150 of oVND PICTURE "@!" UPDATE
REDEFINE GET oZIP VAR cZIP ID 160 of oVND PICTURE "99999-9999" UPDATE
REDEFINE GET oPHONE1 VAR cPHONE1 ID 170 of oVND PICTURE "(999)999-9999" UPDATE
REDEFINE GET oPTYPE1 VAR cPTYPE1 ID 114 of oVND PICTURE "@!" UPDATE
REDEFINE GET oPHONE2 VAR cPHONE2 ID 122 of oVND PICTURE "(999)999-9999" UPDATE
REDEFINE GET oPTYPE2 VAR cPTYPE2 ID 123 of oVND PICTURE "@!" UPDATE
REDEFINE GET oFAX VAR cFAX ID 124 of oVND PICTURE "(999)999-9999" UPDATE
REDEFINE GET oCONTACT VAR cCONTACT ID 180 of oVND PICTURE "@!" UPDATE
REDEFINE GET oEMAIL VAR cEMAIL ID 125 of oVND UPDATE
REDEFINE GET oWEBSITE VAR cWEBSITE ID 126 of oVND UPDATE
REDEFINE GET oBVENDOR VAR cBVENDOR ID 115 of oVND PICTURE "@!" UPDATE
REDEFINE GET oBADDR1 VAR cBADDR1 ID 116 of oVND PICTURE "@!" ;
when cBvendor <> "SAME" UPDATE
REDEFINE GET oBADDR2 VAR cBADDR2 ID 121 of oVND PICTURE "@!" ;
when cBvendor <> "SAME" UPDATE
REDEFINE GET oBCITY VAR cBCITY ID 117 of oVND PICTURE "@!" ;
when cBvendor <> "SAME" UPDATE
REDEFINE GET oBSTATE VAR cBSTATE ID 118 of oVND PICTURE "@!" ;
when cBvendor <> "SAME" UPDATE
REDEFINE GET oBZIP VAR cBZIP ID 119 of oVND PICTURE "99999-9999" ;
when cBvendor <> "SAME" UPDATE
REDEFINE GET oTERMS VAR cTERMS ID 128 of oVND PICTURE "@!" UPDATE
REDEFINE GET oCOMMENTS VAR cCOMMENTS ID 127 of oVND UPDATE
REDEFINE GET oEntryBy VAR cEntryBy ID 141 of oVnd COLOR "N/W" READONLY
REDEFINE GET oEntryDate VAR dEntryDate ID 142 of oVnd COLOR "N/W" READONLY
ELSE // view
REDEFINE GET oVENDORNO VAR cVENDORNO ID 110 of oVND COLOR "N/W" READONLY
REDEFINE GET oVENDOR VAR cVENDOR ID 120 of oVND COLOR "N/W" READONLY
REDEFINE GET oADDR1 VAR cADDR1 ID 130 of oVND COLOR "N/W" READONLY
REDEFINE GET oADDR2 VAR cADDR2 ID 113 of oVND COLOR "N/W" READONLY
REDEFINE GET oCITY VAR cCITY ID 140 of oVND COLOR "N/W" READONLY
REDEFINE GET oSTATE VAR cSTATE ID 150 of oVND COLOR "N/W" READONLY
REDEFINE GET oZIP VAR cZIP ID 160 of oVND COLOR "N/W" READONLY
REDEFINE GET oPHONE1 VAR cPHONE1 ID 170 of oVND COLOR "N/W" READONLY
REDEFINE GET oPTYPE1 VAR cPTYPE1 ID 114 of oVND COLOR "N/W" READONLY
REDEFINE GET oPHONE2 VAR cPHONE2 ID 122 of oVND COLOR "N/W" READONLY
REDEFINE GET oPTYPE2 VAR cPTYPE2 ID 123 of oVND COLOR "N/W" READONLY
REDEFINE GET oFAX VAR cFAX ID 124 of oVND COLOR "N/W" READONLY
REDEFINE GET oCONTACT VAR cCONTACT ID 180 of oVND COLOR "N/W" READONLY
REDEFINE GET oEMAIL VAR cEMAIL ID 125 of oVND COLOR "N/W" READONLY
REDEFINE GET oWEBSITE VAR cWEBSITE ID 126 of oVND COLOR "N/W" READONLY
REDEFINE GET oBVENDOR VAR cBVENDOR ID 115 of oVND COLOR "N/W" READONLY
REDEFINE GET oBADDR1 VAR cBADDR1 ID 116 of oVND COLOR "N/W" READONLY
REDEFINE GET oBADDR2 VAR cBADDR2 ID 121 of oVND COLOR "N/W" READONLY
REDEFINE GET oBCITY VAR cBCITY ID 117 of oVND COLOR "N/W" READONLY
REDEFINE GET oBSTATE VAR cBSTATE ID 118 of oVND COLOR "N/W" READONLY
REDEFINE GET oBZIP VAR cBZIP ID 119 of oVND COLOR "N/W" READONLY
REDEFINE GET oTERMS VAR cTERMS ID 128 of oVND COLOR "N/W" READONLY
REDEFINE GET oCOMMENTS VAR cCOMMENTS ID 127 of oVND COLOR "N/W" READONLY
REDEFINE GET oEntryBy VAR cEntryBy ID 141 of oVnd COLOR "N/W" READONLY
REDEFINE GET oEntryDate VAR dEntryDate ID 142 of oVnd COLOR "N/W" READONLY
ENDIF
REDEFINE BTNBMP oBUTT1 ID 111 of oVND ; // ok
FileName (cDefa+"\Icons\OK1.bmp"),;
(cDefa+"\Icons\DOK1.bmp"),;
(cDefa+"\Icons\DOK1.bmp") ;
PROMPT " &Ok " LEFT 2007;
ACTION ( IF(cMODE = "V",lOK := .T. , lOK := _busrules( cMODE ) ), ;
IF(cMODE = "V",lOK := .T. , if(lOK = .T., _doit( cMODE, oRsVend ),)),;
IF(lOK = .T., oVND:END(), ) )
REDEFINE BTNBMP oBUTT2 ID 112 of oVND ; // cancel
FileName (cDefa+"\Icons\CANCEL1.bmp"),;
(cDefa+"\Icons\DCANCEL1.bmp"),;
(cDefa+"\Icons\DCANCEL1.bmp") ;
PROMPT "&Cancel " LEFT 2007;
ACTION ( lOK := .F., oVND:END() )
ACTIVATE DIALOG oVND ;
ON INIT _Disable() ;
ON PAINT GradientFill( hDC, 0, 0, oVND:nHeight, oVND:nWidth, xGRAD8, .T.)
lOK1 := lOK
_CLEANUP()
if(empty(oBtn1), ,oBtn1:Enable())
if(empty(oBtn2), ,oBtn2:Enable())
if(empty(oBtn3), ,oBtn3:Enable())
if(empty(Obtn4), ,oBtn4:Enable())
if(empty(oBtn5), ,oBtn5:Enable())
if(empty(oBtn6), ,oBtn6:Enable())
SysReFresh()
RETURN( lOK1 )
//-----------------------------------
Static Func _Disable()
If cBVendor = "SAME"
oBADDR1:lDisColors := .f.
oBADDR1:nClrTextDis := CLR_BLACK // Color text disable status
oBADDR1:nClrPaneDis := CLR_HGRAY // Color Pane disable status
oBaddr1:ReFresh()
oBADDR2:lDisColors := .f.
oBADDR2:nClrTextDis := CLR_BLACK // Color text disable status
oBADDR2:nClrPaneDis := CLR_HGRAY // Color Pane disable status
oBaddr2:ReFresh()
oBCITY:lDisColors := .f.
oBCITY:nClrTextDis := CLR_BLACK // Color text disable status
oBCITY:nClrPaneDis := CLR_HGRAY // Color Pane disable status
oBcity:ReFresh()
oBSTATE:lDisColors := .f.
oBSTATE:nClrTextDis := CLR_BLACK // Color text disable status
oBSTATE:nClrPaneDis := CLR_HGRAY // Color Pane disable status
oBstate:ReFresh()
oBZIP:lDisColors := .f.
oBZIP:nClrTextDis := CLR_BLACK // Color text disable status
oBZIP:nClrPaneDis := CLR_HGRAY // Color Pane disable status
oBzip:ReFresh()
ENDIF
SysReFresh()
RETURN(.T.)
.RC
- Code: Select all Expand view RUN
VENDVIEW DIALOG 148, 57, 442, 331
STYLE WS_POPUP | WS_CAPTION
FONT 6, "MS Sans Serif"
{
LTEXT "VendorNo ", -1, 10, 15, 49, 12, SS_NOPREFIX | WS_GROUP
EDITTEXT 110, 64, 15, 65, 12, ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
LTEXT "Vendor ", -1, 10, 30, 49, 11, SS_NOPREFIX | WS_GROUP
EDITTEXT 120, 64, 29, 134, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
LTEXT "Address 1 ", -1, 10, 43, 49, 12, SS_NOPREFIX | WS_GROUP
EDITTEXT 130, 64, 43, 134, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
LTEXT "Address 2 ", -1, 10, 58, 49, 12, SS_NOPREFIX | WS_GROUP
EDITTEXT 113, 64, 58, 134, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
LTEXT "City\\St\\Zip", -1, 10, 73, 49, 12, SS_NOPREFIX | WS_GROUP
EDITTEXT 140, 64, 73, 65, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT 150, 132, 73, 17, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
EDITTEXT 160, 152, 73, 46, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
LTEXT "Phone 1", -1, 10, 112, 49, 12, SS_NOPREFIX | WS_GROUP
EDITTEXT 170, 64, 112, 66, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
CTEXT "Ext", -1, 133, 112, 17, 12, SS_CENTER | SS_NOPREFIX | WS_GROUP
EDITTEXT 114, 152, 112, 47, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
LTEXT "Phone 2", -1, 10, 127, 49, 12, SS_NOPREFIX | WS_GROUP
EDITTEXT 122, 64, 127, 66, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
CTEXT "Ext", -1, 133, 127, 17, 12, SS_CENTER | SS_NOPREFIX | WS_GROUP
EDITTEXT 123, 152, 127, 47, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
LTEXT "Fax Number", -1, 10, 141, 49, 12, SS_NOPREFIX | WS_GROUP
EDITTEXT 124, 64, 141, 66, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
LTEXT "Contact ", -1, 10, 176, 41, 11, SS_NOPREFIX | WS_GROUP
EDITTEXT 180, 10, 187, 210, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
LTEXT "E-Mail", -1, 10, 205, 41, 11, SS_NOPREFIX | WS_GROUP
EDITTEXT 125, 10, 216, 210, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
LTEXT "Web Site", -1, 10, 235, 41, 11, SS_NOPREFIX | WS_GROUP
EDITTEXT 126, 10, 246, 210, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
LTEXT "Pay To", -1, 237, 29, 49, 11, SS_NOPREFIX | WS_GROUP
EDITTEXT 115, 291, 28, 134, 12
LTEXT "Address 1 ", -1, 237, 42, 49, 12, SS_NOPREFIX | WS_GROUP
EDITTEXT 116, 291, 42, 134, 12
LTEXT "Address 2 ", -1, 237, 57, 49, 12, SS_NOPREFIX | WS_GROUP
EDITTEXT 121, 291, 57, 134, 12
LTEXT "City\\St\\Zip", -1, 237, 72, 49, 12, SS_NOPREFIX | WS_GROUP
EDITTEXT 117, 291, 72, 65, 12
EDITTEXT 118, 359, 72, 17, 12
EDITTEXT 119, 380, 72, 45, 12
LTEXT "Payment Terms", -1, 232, 112, 53, 12, SS_NOPREFIX | WS_GROUP
EDITTEXT 128, 291, 112, 65, 12
LTEXT "Comments", -1, 232, 139, 41, 11, SS_NOPREFIX | WS_GROUP
EDITTEXT 127, 232, 151, 202, 107, ES_MULTILINE | ES_AUTOVSCROLL | WS_BORDER | WS_TABSTOP
CONTROL "&Ok", 111, "TBtnBmp", 32 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 347, 284, 41, 25
CONTROL "&Cancel", 112, "TBtnBmp", 32 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 390, 284, 41, 25
GROUPBOX "Payment Address ( if not SAME ) ", 631, 232, 6, 203, 97, BS_GROUPBOX
EDITTEXT 141, 58, 281, 57, 12, ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
EDITTEXT 142, 58, 295, 57, 12, ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
LTEXT "Last Update", -1, 11, 283, 37, 24
}