FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Is there a way to set oSays to transparent universally?
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

Is there a way to set oSays to transparent universally?

Posted: 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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

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

Posted: 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 :




Best regards
Uwe :-)
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.
Posts: 169
Joined: Mon Feb 25, 2008 02:42 AM

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

Posted: Wed Sep 09, 2009 02: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,
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

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

Posted: Wed Sep 09, 2009 04: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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

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

Posted: Wed Sep 09, 2009 06: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 :


Best Regards
Uwe :-)
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.
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

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

Posted: Wed Sep 09, 2009 02: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

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

Posted: Wed Sep 09, 2009 06: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

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

Posted: Wed Sep 09, 2009 07:44 PM

I'll give it a try this evening.

Thank you

Harvey
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

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

Posted: Thu Sep 10, 2009 03: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

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

Posted: Thu Sep 10, 2009 07: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

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

Posted: Thu Sep 10, 2009 08:13 PM

set in redifine. Actually both.

Thank you

Harvey
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

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

Posted: Thu Sep 10, 2009 09: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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM

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

Posted: Fri Sep 11, 2009 02: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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

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

Posted: Fri Sep 11, 2009 04: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM

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

Posted: Fri Sep 11, 2009 08: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