SetDlgGradient and text not transparent

SetDlgGradient and text not transparent

Postby Rick Lipkin » Tue Oct 08, 2013 12:52 pm

To All

I have noticed using SetDlgGradient() that my text fields are not always transparent .. here is the code that supports the picture .. specifically notice the 'active' text not transparent and hints throughout all the text that they are not transparent.

Rick Lipkin

Code: Select all  Expand view  RUN

DarkGreyGrad()
...
...

   REDEFINE GROUP oGrp1 ID 200 OF oGrps
        oGrp1:SetFont( oFontB )
        oGrp1:nClrText := nRgb( 7,7,224 ) // blue
   REDEFINE SAY oSay1  PROMPT "Company"        ID 110 OF oGrps UPDATE
                oSay1:SetFont( oFontB )
   REDEFINE SAY oSay2  PROMPT "Customer Id"    ID 111 OF oGrps UPDATE
                oSay2:SetFont( oFontB )

   REDEFINE GROUP oGrp2 ID 201 OF oGrps
        oGrp2:SetFont( oFontB )
        oGrp2:nClrText := nRgb( 7,7,224 ) // blue
   REDEFINE SAY oSay3  PROMPT "Customer Id"    ID 112 OF oGrps UPDATE
                oSay3:SetFont( oFontB )
   REDEFINE SAY oSay4  PROMPT "Company Name"   ID 113 OF oGrps UPDATE
                oSay4:SetFont( oFontB )
   REDEFINE SAY oSay5  PROMPT "Address"        ID 114 OF oGrps UPDATE
                oSay5:SetFont( oFontB )
   REDEFINE SAY oSay6  PROMPT "City\St\Zip"    ID 115 OF oGrps UPDATE
                oSay6:SetFont( oFontB )

   REDEFINE GROUP oGrp3 ID 202 OF oGrps
        oGrp3:SetFont( oFontB )
        oGrp3:nClrText := nRgb( 7,7,224 ) // blue
   REDEFINE SAY oSay7  PROMPT "Bill to This Address" ID 116 OF oGrps UPDATE
                oSay7:SetFont( oFontB )
   REDEFINE SAY oSay8  PROMPT "Company Name"   ID 117 OF oGrps UPDATE
                oSay8:SetFont( oFontB )
   REDEFINE SAY oSay9  PROMPT "Address"        ID 118 OF oGrps UPDATE
                oSay9:SetFont( oFontB )
   REDEFINE SAY oSay10 PROMPT "City\St\Zip"    ID 119 OF oGrps UPDATE
                oSay10:SetFont( oFontB )
   REDEFINE SAY oSay11 PROMPT "Phone\Fax"      ID 120 OF oGrps UPDATE
                oSay11:SetFont( oFontB )
   REDEFINE SAY oSay12 PROMPT "Contact"        ID 121 of oGrps UPDATE
                oSay12:SetFont( oFontB )
   REDEFINE SAY oSay13 PROMPT "E-Mail"         ID 122 OF oGrps UPDATE
                oSay13:SetFont( oFontB )
   REDEFINE SAY oSay14 PROMPT "Account Executive"    ID 123 of oGrps UPDATE
                oSay14:SetFont( oFontB )
   REDEFINE SAY oSay15 PROMPT "Active"         ID 124 of oGrps UPDATE
                oSay15:SetFont( oFontB )


//--------------------
Func DarkGreyGrad()

SetDlgGradient({{ 0.80, 14671839, 4144959  },{ 0.1, 4144959, 14671839  }})

Return(nil)
 

Image
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: SetDlgGradient and text not transparent

Postby Antonio Linares » Tue Oct 08, 2013 1:20 pm

Rick,

Please don't REDEFINE the "Active" SAY and try it again:

/*
REDEFINE SAY oSay15 PROMPT "Active" ID 124 of oGrps UPDATE
oSay15:SetFont( oFontB )
*/

I appreciate if you can post the resulting screenshot, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: SetDlgGradient and text not transparent

Postby Rick Lipkin » Tue Oct 08, 2013 3:46 pm

Antonio

I rem'd out the redefine and it had no effect .. :(

Rick Lipkin

Image
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: SetDlgGradient and text not transparent

Postby Antonio Linares » Tue Oct 08, 2013 4:16 pm

Rick,

Please post here the used RC section, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: SetDlgGradient and text not transparent

Postby Rick Lipkin » Tue Oct 08, 2013 4:24 pm

Antonio

Here is the entire .rc .. thanks for all your help !

Rick Lipkin
Code: Select all  Expand view  RUN

CUSTVIEW DIALOG 3, 13, 612, 343
STYLE WS_CHILD
FONT 6, "MS Sans Serif"
{
 EDITTEXT 130, 56, 12, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 131, 56, 25, 98, 12, ES_CENTER | ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
 EDITTEXT 132, 56, 59, 98, 12, ES_CENTER | ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
 EDITTEXT 133, 56, 73, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 134, 56, 93, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 135, 56, 107, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 136, 56, 121, 71, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 137, 131, 121, 23, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 138, 161, 121, 55, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 141, 56, 172, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 142, 56, 192, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 143, 56, 206, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 144, 56, 220, 71, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 145, 131, 220, 23, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 146, 161, 220, 55, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 147, 56, 241, 71, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 148, 131, 241, 85, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 149, 56, 255, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 150, 56, 269, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 151, 56, 283, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 CHECKBOX "", 152, 56, 323, 8, 8, BS_AUTOCHECKBOX | NOT WS_TABSTOP
 EDITTEXT 153, 70, 322, 23, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
 CONTROL "&Close", 182, "TBtnBmp", 32 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 532, 315, 70, 17
 LTEXT "Company Name", 113, 7, 73, 46, 18, SS_NOPREFIX | WS_GROUP
 CONTROL "Customer Info", 172, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 230, 13, 373, 150
 LTEXT "Address", 114, 7, 94, 46, 12, SS_NOPREFIX | WS_GROUP
 LTEXT "City\\St\\Zip", 115, 7, 122, 46, 12, SS_NOPREFIX | WS_GROUP
 LTEXT "Phone\\Fax ", 120, 6, 241, 46, 12, SS_NOPREFIX | WS_GROUP
 LTEXT "Contact ", 121, 6, 255, 46, 12, SS_NOPREFIX | WS_GROUP
 LTEXT "E-Mail", 122, 6, 269, 46, 12, SS_NOPREFIX | WS_GROUP
 GROUPBOX "  Physical Address ", 201, 3, 44, 221, 93, BS_GROUPBOX
 LTEXT "Customer Id", 112, 7, 59, 46, 12, SS_NOPREFIX | WS_GROUP
 CONTROL "&Add New", 181, "TBtnBmp", 32 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 459, 315, 70, 17
 CONTROL "&Save New", 180, "TBtnBmp", 32 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 387, 315, 70, 17
 LTEXT "Customer Names", 125, 231, 2, 69, 11, SS_NOPREFIX | WS_GROUP
 LTEXT "( double click the Customer to load detail )", 126, 323, 2, 204, 11, SS_NOPREFIX | WS_GROUP
 CHECKBOX "", 139, 57, 153, 8, 8, BS_AUTOCHECKBOX | NOT WS_TABSTOP
 LTEXT "Bill To This Address", 116, 7, 152, 46, 18, SS_NOPREFIX | WS_GROUP
 EDITTEXT 140, 71, 153, 23, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
 LTEXT "Company Name", 117, 7, 172, 46, 18, SS_NOPREFIX | WS_GROUP
 LTEXT "Address", 118, 7, 193, 46, 12, SS_NOPREFIX | WS_GROUP
 LTEXT "City\\St\\Zip", 119, 7, 221, 45, 12, SS_NOPREFIX | WS_GROUP
 GROUPBOX "  Billing Address ", 202, 3, 139, 221, 97, BS_GROUPBOX
 LTEXT "Company", 110, 7, 12, 46, 12, SS_NOPREFIX | WS_GROUP
 GROUPBOX "  Search", 200, 3, 1, 221, 41, BS_GROUPBOX
 LTEXT "Active", 124, 6, 322, 46, 12, SS_NOPREFIX | WS_GROUP
 LTEXT "Customer Id", 111, 7, 25, 46, 12, SS_NOPREFIX | WS_GROUP
 LTEXT "Account Executive", 123, 6, 283, 46, 18, SS_NOPREFIX | WS_GROUP
}
 
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: SetDlgGradient and text not transparent

Postby Antonio Linares » Tue Oct 08, 2013 4:27 pm

Rick,

Please remove the WS_GROUP style from this line and try it again, thanks:

LTEXT "Active", 124, 6, 322, 46, 12, SS_NOPREFIX
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: SetDlgGradient and text not transparent

Postby Rick Lipkin » Tue Oct 08, 2013 6:13 pm

Antonio

I removed all the Ws_Group in the .rc and it had no effect .. I am using FWH 1203 ..

Rick Lipkin
Code: Select all  Expand view  RUN

CUSTVIEW DIALOG 3, 13, 612, 343
STYLE WS_CHILD
FONT 6, "MS Sans Serif"
{
 EDITTEXT 130, 56, 12, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 131, 56, 25, 98, 12, ES_CENTER | ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
 EDITTEXT 132, 56, 59, 98, 12, ES_CENTER | ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
 EDITTEXT 133, 56, 73, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 134, 56, 93, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 135, 56, 107, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 136, 56, 121, 71, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 137, 131, 121, 23, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 138, 161, 121, 55, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 141, 56, 172, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 142, 56, 192, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 143, 56, 206, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 144, 56, 220, 71, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 145, 131, 220, 23, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 146, 161, 220, 55, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 147, 56, 241, 71, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 148, 131, 241, 85, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 149, 56, 255, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 150, 56, 269, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 EDITTEXT 151, 56, 283, 160, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP
 CHECKBOX "", 152, 56, 323, 8, 8, BS_AUTOCHECKBOX | NOT WS_TABSTOP
 EDITTEXT 153, 70, 322, 23, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
 CONTROL "&Close", 182, "TBtnBmp", 32 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 532, 315, 70, 17
 LTEXT "Company Name", 113, 7, 73, 46, 18, SS_NOPREFIX
 CONTROL "Customer Info", 172, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 230, 13, 373, 150
 LTEXT "Address", 114, 7, 94, 46, 12, SS_NOPREFIX
 LTEXT "City\\St\\Zip", 115, 7, 122, 46, 12, SS_NOPREFIX
 LTEXT "Phone\\Fax ", 120, 6, 241, 46, 12, SS_NOPREFIX
 LTEXT "Contact ", 121, 6, 255, 46, 12, SS_NOPREFIX
 LTEXT "E-Mail", 122, 6, 269, 46, 12, SS_NOPREFIX
 GROUPBOX "  Physical Address ", 201, 3, 44, 221, 93, BS_GROUPBOX
 LTEXT "Customer Id", 112, 7, 59, 46, 12, SS_NOPREFIX
 CONTROL "&Add New", 181, "TBtnBmp", 32 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 459, 315, 70, 17
 CONTROL "&Save New", 180, "TBtnBmp", 32 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 387, 315, 70, 17
 LTEXT "Customer Names", 125, 231, 2, 69, 11, SS_NOPREFIX
 LTEXT "( double click the Customer to load detail )", 126, 323, 2, 204, 11, SS_NOPREFIX
 CHECKBOX "", 139, 57, 153, 8, 8, BS_AUTOCHECKBOX | NOT WS_TABSTOP
 LTEXT "Bill To This Address", 116, 7, 152, 46, 18, SS_NOPREFIX
 EDITTEXT 140, 71, 153, 23, 12, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP
 LTEXT "Company Name", 117, 7, 172, 46, 18, SS_NOPREFIX
 LTEXT "Address", 118, 7, 193, 46, 12, SS_NOPREFIX
 LTEXT "City\\St\\Zip", 119, 7, 221, 45, 12, SS_NOPREFIX
 GROUPBOX "  Billing Address ", 202, 3, 139, 221, 97, BS_GROUPBOX
 LTEXT "Company", 110, 7, 12, 46, 12, SS_NOPREFIX
 GROUPBOX "  Search", 200, 3, 1, 221, 41, BS_GROUPBOX
 LTEXT "Active", 124, 6, 322, 46, 12, SS_NOPREFIX
 LTEXT "Customer Id", 111, 7, 25, 46, 12, SS_NOPREFIX
 LTEXT "Account Executive", 123, 6, 283, 46, 18, SS_NOPREFIX
}
 

Image
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: SetDlgGradient and text not transparent

Postby Antonio Linares » Tue Oct 08, 2013 6:23 pm

Rick,

Please remove SS_NOPREFIX also, thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: SetDlgGradient and text not transparent

Postby Antonio Linares » Tue Oct 08, 2013 6:35 pm

Another possibility is to replace:

LTEXT "Active", 124, 6, 322, 46, 12, SS_NOPREFIX

with:

CONTROL "Active", 124, "Static",, 6, 322, 46, 12
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: SetDlgGradient and text not transparent

Postby Rick Lipkin » Tue Oct 08, 2013 7:14 pm

Antonio

CONTROL "Active", 124, "Static",, 6, 322, 46, 12 would not compile and LTEXT "Active", 124, 6, 322, 46, 12, SS_NOPREFIX had no effect.

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: SetDlgGradient and text not transparent

Postby Enrico Maria Giordano » Tue Oct 08, 2013 7:50 pm

Ok, Rick, please make a little sample that we can compile and run here.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: SetDlgGradient and text not transparent

Postby Rick Lipkin » Tue Oct 08, 2013 8:38 pm

Enrico

Believe me .. I have created the small sample below with a couple of fields and says and I can not get the same results .. I will continue to see if I can put together some different code.

Rick Lipkin
Code: Select all  Expand view  RUN


#INCLUDE "FIVEWIN.CH"

//---------------------------
Func Main()

Local oDlg,oSay1,oSay2,oFontB,oComp,cComp,oComp1,cComp1,oBtn1
Local oGrp1,oGrp2

oFontB := TFont():New("Ms Sans Serif",,-6,.F.,.T. ,,,,.F. )

cComp  := "Company One"
cComp1 := "Company Two"

DarkGreyGrad()

DEFINE DIALOG oDlg RESOURCE "RICK"       ;
       TITLE "Dialog SetDlgGradient Test"

      REDEFINE GROUP oGrp1 ID 200 OF oDlg
        oGrp1:SetFont( oFontB )
        oGrp1:nClrText := nRgb( 7,7,224 ) // blue

      REDEFINE SAY oSay1 PROMPT "Company Name"  ID 117 OF oDlg UPDATE
                   oSay1:SetFont( oFontB )

      REDEFINE GROUP oGrp2 ID 201 OF oDlg
        oGrp2:SetFont( oFontB )
        oGrp2:nClrText := nRgb( 7,7,224 ) // blue


      REDEFINE SAY oSay2 PROMPT "Company Name"  ID 119 OF oDlg UPDATE
                   oSay2:SetFont( oFontB )

      REDEFINE GET oComp  var cComp  ID 118 of oDlg UPDATE
      REDEFINE GET oComp1 var cComp1 ID 120 of oDlg UPDATE

      REDEFINE BTNBMP oBTN1 ID 125 of oDlg  ;
         PROMPT "Close" 2007;
         ACTION ( oDlg:End() )


ACTIVATE DIALOG oDLG CENTERED

RELEASE FONT oFontB

Return(nil)

//--------------------
Func DarkGreyGrad()

SetDlgGradient({{ 0.80, 14671839, 4144959  },{ 0.1, 4144959, 14671839  }})

*SetDlgGradient( { { 0.87, 16777215, 11513775 },{ 0.87,11513775, 16777215 }})
Return(nil)
 

Code: Select all  Expand view  RUN

RICK DIALOG 12, 57, 327, 357
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 6, "MS Sans Serif"
{
 CONTROL "Close", 125, "TBtnBmp", 32 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 248, 292, 54, 48
 LTEXT "Company Name1", 117, 27, 34, 42, 23, SS_NOPREFIX | WS_GROUP
 EDITTEXT 118, 76, 35, 118, 12, ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
 LTEXT "Company Name2", 119, 27, 318, 42, 23, SS_NOPREFIX | WS_GROUP
 EDITTEXT 120, 76, 319, 118, 12, ES_AUTOHSCROLL | NOT WS_TABSTOP | WS_BORDER
 GROUPBOX "  Search", 200, 5, 18, 221, 45, BS_GROUPBOX
 GROUPBOX "  Billing Address ", 201, 8, 189, 221, 70, BS_GROUPBOX
}
 
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken, nageswaragunupudi and 56 guests