@ Say transparent on Windows
@ Say transparent on Windows
I rarely use @ Say / @ Get, but I'm trying to do something on a Window.
I use the following line to display a string:
@ 40,285 SAY vDate OF oWndc PIXEL SIZE 315,20 CENTER COLOR CLR_BLACK UPDATE
I have to use the CLR_BLACK to see the text. However, I want to use a Brush on the window, and when I do, it shows a white background to the text.
This is not a problem in dialogs with resources, because all text is transparent. If I don't use the COLOR CLR_BLACK, nothing shows up.
So how do I get just the text, using the brush background, with an @ x,y SAY on a WIndow ? I've seen use of the TRANSPARENT command on a Dialog, but it won't parse on a window ...
Tim
I use the following line to display a string:
@ 40,285 SAY vDate OF oWndc PIXEL SIZE 315,20 CENTER COLOR CLR_BLACK UPDATE
I have to use the CLR_BLACK to see the text. However, I want to use a Brush on the window, and when I do, it shows a white background to the text.
This is not a problem in dialogs with resources, because all text is transparent. If I don't use the COLOR CLR_BLACK, nothing shows up.
So how do I get just the text, using the brush background, with an @ x,y SAY on a WIndow ? I've seen use of the TRANSPARENT command on a Dialog, but it won't parse on a window ...
Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: @ Say transparent on Windows
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oWnd
LOCAL oSay, oBru
DEFINE BRUSH oBru STYLE BORLAND
DEFINE WINDOW oWnd BRUSH oBru
ACTIVATE WINDOW oWnd;
ON PAINT oWnd:Say( 100, 100, "This is a test", CLR_RED, , , .T., .T. )
RETURN NIL
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Workaround
That code might work in a small sample, but to display a screen full of @ Say's makes it very awkward and hard to trace problems that might arise.
So at least I'm not totally out of the loop here ... and I agree with James.
So at least I'm not totally out of the loop here ... and I agree with James.
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Workaround
Honestly, I can't see so many differences between a series of @ SAY and a series of oWnd:Say().
EMG
EMG
Say
When I put together code, its preferably in order, so the say would be one line, and the get right below it. It makes it easier to remember what each get is for, and it makes it easier to make quick formatting changes ( moving a say and get around on the window ).
Here I could have to put a group of say commands all into an activate statement ...
I guess I would consider that an issue when it doesn't have to be that way ( I would think ). I really don't see why we would want the say framed in a white background anyway ( or any color for that matter ).
Tim
Here I could have to put a group of say commands all into an activate statement ...
I guess I would consider that an issue when it doesn't have to be that way ( I would think ). I really don't see why we would want the say framed in a white background anyway ( or any color for that matter ).
Tim
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Say
Nope, you can just put a function call in the ACTIVATE statement:TimStone wrote:When I put together code, its preferably in order, so the say would be one line, and the get right below it. It makes it easier to remember what each get is for, and it makes it easier to make quick formatting changes ( moving a say and get around on the window ).
Here I could have to put a group of say commands all into an activate statement ...
Code: Select all
ACTIVATE WINDOW oWnd;
ON PAINT MYPAINT()
STATIC FUNCTION MYPAINT()
oWnd:Say( 100, 100, "This is a test 1", CLR_RED, , , .T., .T. )
oWnd:Say( 120, 100, "This is a test 2", CLR_RED, , , .T., .T. )
RETURN NIL
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Say
I agree.TimStone wrote:I really don't see why we would want the say framed in a white background anyway ( or any color for that matter ).
EMG
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
I guess most users of FWH would agree. Will Mr Antonio consider making Says transparent by default and with background color by choice?
Would such a change break the existing code of many programs or is it against windows default behaviour ?
Another simple doubt. When oSay:lTransparent works well on Dialog why does it not ( or why should it not ) work the same way on a Window?
Would such a change break the existing code of many programs or is it against windows default behaviour ?
Another simple doubt. When oSay:lTransparent works well on Dialog why does it not ( or why should it not ) work the same way on a Window?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Dialog on window
James,
That is exactly what I tried originally ( early thread ) but I couldn't get the dialog to position correctly.
There was a control at 10,10 on the window ( that only worked on windows ) and the dialog just wouldn't position around that ...
That is exactly what I tried originally ( early thread ) but I couldn't get the dialog to position correctly.
There was a control at 10,10 on the window ( that only worked on windows ) and the dialog just wouldn't position around that ...
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Reply
Please check your email
Tim Stone
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
http://www.MasterLinkSoftware.com
timstone@masterlinksoftware.com
Using: FWH 19.06 with Harbour 3.2.0 / Microsoft Visual Studio Community 2019
- patrickmast
- Posts: 39
- Joined: Tue Jan 24, 2006 6:16 pm
- Contact:
Re: Reply
Hey guys,
I vote for standard a "TRANSPARANT" command in the SAY command. So you simply need to add "TRANSPARANT" to all your SAY's. Its the most "backward" compatible solution I think.
Patrick
I vote for standard a "TRANSPARANT" command in the SAY command. So you simply need to add "TRANSPARANT" to all your SAY's. Its the most "backward" compatible solution I think.
Patrick
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact: