Is there a way to set oSays to transparent universally?

Is there a way to set oSays to transparent universally?

Postby hag » Tue Sep 08, 2009 11:17 pm

I want to set all dialogs (resources) to have transparent says. There are many dialogs with 100's of says. I need to add in each function oSay:ltransparent := .t. and many of the says are different and all local. Its a big job. Anybody have any suggestions?

All help appreciated as usual.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Is there a way to set oSays to transparent universally?

Postby ukoenig » Tue Sep 08, 2009 11:59 pm

Hello Harvey,

It seems, oSAY1:lTransparent := .T. is not needed for Transparent-painting.
Just define the DIALOG transparent, it will make it easy for You.

DEFINE DIALOG oDlg5 RESOURCE "TXTTEST2" TITLE "Text-Test" ;
FONT oProgFont TRANSPARENT

REDEFINE SAY oSAY1 VAR cText1 ID 110 OF oDlg5 COLOR T_COLOR FONT oTextFont

// oSAY1:lTransparent := .T.

I still added another Say-test for the next GradientTool-Update.
Image- and Brush-Background :

Image


Best regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Is there a way to set oSays to transparent universally?

Postby fafi » Wed Sep 09, 2009 2:39 am

hag wrote:I want to set all dialogs (resources) to have transparent says. There are many dialogs with 100's of says. I need to add in each function oSay:ltransparent := .t. and many of the says are different and all local. Its a big job. Anybody have any suggestions?

All help appreciated as usual.


change lTransparent with .t. on say.prg

-> lTransparent := .t.
Fafi,
User avatar
fafi
 
Posts: 169
Joined: Mon Feb 25, 2008 2:42 am

Re: Is there a way to set oSays to transparent universally?

Postby hag » Wed Sep 09, 2009 4:21 am

Fafi:
I set say.prg into rmk files. Changed ltransparent default to .t., compiled say.prg and it didn't work.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Is there a way to set oSays to transparent universally?

Postby ukoenig » Wed Sep 09, 2009 6:13 am

Harvey,

In case all Say's You need transparent :
the Dialog has to be defined as transparent.
No Settings for the SAY's.

In case only some Say's You need transparent :
the Dialog has not to be defined as transparent.
The needed SAY's must be defined as transparent.

The Screenshot shows the difference :
Image

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Is there a way to set oSays to transparent universally?

Postby hag » Wed Sep 09, 2009 2:38 pm

Thanks UWE you seem to be correct. Changing the class didn't work. But if the default is .f. for ltransparent it would seem logical that setting it to .t. should work.?????
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Is there a way to set oSays to transparent universally?

Postby James Bott » Wed Sep 09, 2009 6:43 pm

Harvey,

>Changing the class didn't work. But if the default is .f. for ltransparent it would seem logical that setting it to .t. should work.?????

Didn't you get the memo? Logic doesn't work on Wednesdays anymore.

Try this test. Add a msgInfo( oSay:lTransparent) after a redefined say in one of your dialogs. This will confirm the setting of lTransparent. Also try it in the ON INIT clause of the ACTIVATE DIALOG. Perhaps the say.prg you modified isn't getting linked, or the lTransparent value is getting changed somewhere else in TSay.

Or, logic doesn't work on Wednesdays...

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Is there a way to set oSays to transparent universally?

Postby hag » Wed Sep 09, 2009 7:44 pm

I'll give it a try this evening.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Is there a way to set oSays to transparent universally?

Postby hag » Thu Sep 10, 2009 3:16 pm

James:

UWE is correct. Changing the ltranslparent to a .t. from a .f. does nothing.

I put a ? ltransparent direclty below the declaration of the ltransparent := .t. in say.prg and it shows up as a .f.
So logic is out on Wednesday.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Is there a way to set oSays to transparent universally?

Postby James Bott » Thu Sep 10, 2009 7:50 pm

Harvey,

I note that lTransparent is defaulted in several places in TSay.

If you changed the default in the New() method it would not affect the Refine() method. So when you redefine the say (even if just to test the value of lTransparent) it will default to false.

Where did you change the default value?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Is there a way to set oSays to transparent universally?

Postby hag » Thu Sep 10, 2009 8:13 pm

set in redifine. Actually both.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Is there a way to set oSays to transparent universally?

Postby James Bott » Thu Sep 10, 2009 9:17 pm

Harvey,

OK, here is the problem. The preprocessor is passing .f. as lTransparent by default, so the DEAFAULT settings in TSay are never used. Below is the preprocessor output for a test I made. lTransparent is the last parameter.

oSay := TSay():New( 2, 2, {|| "&One"}, oDlg,,, .F., .F., .F., .F.,,,,, .F., .F., .F., .F., .F., .F., .F. )

So, to force lTransparent to .T. always, you need to just put this line after the default setting in the New and Redefine methods

lTransparent:= .t.

This will override the preprocessor's passed parameter.

Logic is working again because it is Thursday.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Is there a way to set oSays to transparent universally?

Postby hag » Fri Sep 11, 2009 2:52 am

James I see what i did wrong. I changed the default rather then just add the ltransparent := .t. on a separate line.
Works well but new problems of course.

The say for a group box becomes transparent however all gets and say variables surrounded by the group box are not visible until I scroll over any one of them press enter then they all become visible. The group box is hiding them when transparent. Any thoughts?
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Is there a way to set oSays to transparent universally?

Postby James Bott » Fri Sep 11, 2009 4:59 am

Harvey,

>The group box is hiding them when transparent. Any thoughts?

I seem to remember some recent discussion about that here. Try searching the forum.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Is there a way to set oSays to transparent universally?

Postby StefanHaupt » Fri Sep 11, 2009 8:01 am

Harvey,

if I remember right, you have to define the group box first and then the other controls in the box
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 48 guests