Page 1 of 1

transparent on a say

Posted: Sat Apr 11, 2020 5:21 pm
by Silvio.Falconi
I haven't used resources for a long time but tonight I was forced to create a small dialogue but being old and having signs of early senility,
I don't remember exactly how transparency was assigned to the controls say
I made
REDEFINE SAY oSaySearch[1] Prompt "Cognome" ID 4001 OF oItem:oDlgChild COLOR CLR_BLUE, GetSysColor( 15 )
REDEFINE SAY oSaySearch[1] Prompt "Nome" ID 4002 OF oItem:oDlgChild COLOR CLR_BLUE, GetSysColor( 15 )

oSaySearch[1]:lTransparent:=.t.
oSaySearch[2]:lTransparent:=.t.


why make error ?

Re: transparent on a say

Posted: Sat Apr 11, 2020 6:02 pm
by Rick Lipkin
Silvo

I use gradient backgrounds and the SetDlgGradient() sets the global transparent variable

This is how I color my dialogue boxes .. I have many different colors I have defined as functions .. here is just a Light Grey gradient .. an added feature of the SetGradient() function is it sets the Global transparent flag .. all your text says are transparent by default using SetDLgGradient() fundtion .. no need to add Transparent to your dialogues anymore.

Code: Select all

//------------------
Func LightGreyGrad()

SetDlgGradient( { { .50, nRGB( 216, 216, 216 ), nRGB( 255, 255, 255 ) } } )

Return(nil)
 
Rick Lipkin

Re: transparent on a say

Posted: Sat Apr 11, 2020 7:36 pm
by Silvio.Falconi
Sorry rick,
I asked transparency of a say

I not have dialog with gradient

I use a particolar method SetDialog( cResName ) of C5 Vtaskbar, do you Know it ?

it insert a resource dialog into a menuitem with oBrush (color oThis:nClrPane)

if I insert a say then make not trasparency

Image


now I resolved set color of say with CLR_BLUE, GetSysColor( 15 ) But I think is wrong

Re: transparent on a say

Posted: Sun Apr 12, 2020 1:36 pm
by nageswaragunupudi
now I resolved set color of say with CLR_BLUE, GetSysColor( 15 ) But I think is wrong
Not wrong. This is also one way. Better is COLOR CLR_BLUE, oDlg:nClrPane.
But this works only when the dialog has a plain background color.

Say ..with lTransparent := .t. should work.

Re: transparent on a say

Posted: Sun Apr 12, 2020 5:03 pm
by Silvio.Falconi
> Say ..with lTransparent := .t. should work.
here made error

Error occurred at: 12-04-2020, 19:05:46
Error description: Error BASE/1005 Variabile non disponibile: LTRANSPARENT
Args:
[ 1] = U
[ 2] = L .T.

Stack Calls
===========
Called from: => _LTRANSPARENT( 0 )
Called from: Source\spiaggia\PSpiaggia.prg => VTASKBARBEACH( 557 )


Code: Select all

REDEFINE SAY oSaySearch[1] Prompt "Cognome"  ID 4001 OF oItem:oDlgChild  COLOR CLR_BLUE, GetSysColor( 15 )
        REDEFINE SAY oSaySearch[1] Prompt "Nome"     ID 4002 OF oItem:oDlgChild  COLOR CLR_BLUE, GetSysColor( 15 )
        oSaySearch[1]:lTransparent:=.t.
        oSaySearch[2]:lTransparent:=.t.

 

Re: transparent on a say

Posted: Sun Apr 12, 2020 7:12 pm
by karinha
And writing like that?

Code: Select all

   REDEFINE SAY oSaySearch[1] Prompt "Cognome"  ID 4001 OF oItem:oDlgChild  ;
      COLORS CLR_BLUE, GetSysColor( 15 ) TRANSPARENT

   REDEFINE SAY oSaySearch[2] Prompt "Nome"     ID 4002 OF oItem:oDlgChild  ;
      COLORS CLR_BLUE, GetSysColor( 15 ) TRANSPARENT
 

Re: transparent on a say

Posted: Sun Apr 12, 2020 8:43 pm
by cnavarro
Silvio.Falconi wrote:> Say ..with lTransparent := .t. should work.
here made error

Error occurred at: 12-04-2020, 19:05:46
Error description: Error BASE/1005 Variabile non disponibile: LTRANSPARENT
Args:
[ 1] = U
[ 2] = L .T.

Stack Calls
===========
Called from: => _LTRANSPARENT( 0 )
Called from: Source\spiaggia\PSpiaggia.prg => VTASKBARBEACH( 557 )


Code: Select all

REDEFINE SAY oSaySearch[1] Prompt "Cognome"  ID 4001 OF oItem:oDlgChild  COLOR CLR_BLUE, GetSysColor( 15 )
        REDEFINE SAY oSaySearch[1] Prompt "Nome"     ID 4002 OF oItem:oDlgChild  COLOR CLR_BLUE, GetSysColor( 15 )
        oSaySearch[1]:lTransparent:=.t.
        oSaySearch[2]:lTransparent:=.t.

 
Change second object say ( you have         REDEFINE SAY oSaySearch[1] also )

Code: Select all

        REDEFINE SAY oSaySearch[ 2 ] ..................
 

Re: transparent on a say

Posted: Mon Apr 13, 2020 11:30 am
by Silvio.Falconi
Oopps