FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour oSay background
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

oSay background

Posted: Thu Dec 13, 2007 03:32 PM
Is such a background possible with pure FIVEWIN code.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

oSay background

Posted: Thu Dec 13, 2007 04:12 PM

Yes, using a brush

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

oSay background

Posted: Thu Dec 13, 2007 04:18 PM

Thank you.
Excuse my ignorance. But if I tried with brush I always have full color.
This seems to be gradient.
Best regards,
Otto

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

oSay background

Posted: Thu Dec 13, 2007 04:37 PM

You have to create a brush from a bitmap, and the bitmap has the painted gradient :-)

DEFINE BRUSH oBrush RESOURCE <cBmpResName>

or

DEFINE BRUSH oBrush FILENAME <cBmpFileName>

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

oSay background

Posted: Fri Dec 21, 2007 07:54 AM

Is this the right way to make such a outlook:

Paint a rectangle with
FillRect(oWnd:hDc,aRect1,oBrush:hBrush)
And then paint the text with oWnd:Say
oWnd:say( nRow, nCol, text ,"W",::nClrBack,oFont,.T.,.t.)
Thanks in advance
Otto

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

oSay background

Posted: Fri Dec 21, 2007 09:59 AM

Otto,

There are two ways to paint a text:

  1. Use the oWnd:Say(), as you have done

  2. Use a SAY control: @ ..., ... SAY ...

The advantage of using the 2) is that you don't have to repaint it. The control automatically paints itself. With 1) you have to paint the text everytime the window is repainted

My advice is to use a SAY control that uses a brush with a gradient

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

oSay background

Posted: Fri Dec 21, 2007 10:31 AM

>My advice is to use a SAY control that uses a brush with a gradient

I don't know how to do this?

Would you be so kind to show some code.
Thanks in advance
Otto

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

oSay background

Posted: Fri Dec 21, 2007 01:07 PM
Otto,

Its a simple solution, though we could improve it:
http://www.hotshare.net/file/24901-201766470d.html

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion