Page 1 of 2

Is there a way to set oSays to transparent universally?

PostPosted: Tue Sep 08, 2009 11:17 pm
by hag
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.

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

PostPosted: Tue Sep 08, 2009 11:59 pm
by ukoenig
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:

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

PostPosted: Wed Sep 09, 2009 2:39 am
by fafi
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,

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

PostPosted: Wed Sep 09, 2009 4:21 am
by hag
Fafi:
I set say.prg into rmk files. Changed ltransparent default to .t., compiled say.prg and it didn't work.

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

PostPosted: Wed Sep 09, 2009 6:13 am
by ukoenig
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:

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

PostPosted: Wed Sep 09, 2009 2:38 pm
by hag
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.?????

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

PostPosted: Wed Sep 09, 2009 6:43 pm
by James Bott
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

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

PostPosted: Wed Sep 09, 2009 7:44 pm
by hag
I'll give it a try this evening.

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

PostPosted: Thu Sep 10, 2009 3:16 pm
by hag
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.

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

PostPosted: Thu Sep 10, 2009 7:50 pm
by James Bott
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

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

PostPosted: Thu Sep 10, 2009 8:13 pm
by hag
set in redifine. Actually both.

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

PostPosted: Thu Sep 10, 2009 9:17 pm
by James Bott
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

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

PostPosted: Fri Sep 11, 2009 2:52 am
by hag
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?

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

PostPosted: Fri Sep 11, 2009 4:59 am
by James Bott
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

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

PostPosted: Fri Sep 11, 2009 8:01 am
by StefanHaupt
Harvey,

if I remember right, you have to define the group box first and then the other controls in the box