oSay background

Post Reply
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

oSay background

Post by Otto »

Is such a background possible with pure FIVEWIN code.

Image
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Yes, using a brush
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

Thank you.
Excuse my ignorance. But if I tried with brush I always have full color.
This seems to be gradient.
Best regards,
Otto
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

>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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Otto,

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

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply