Page 1 of 1
oSay background
Posted: Thu Dec 13, 2007 3:32 pm
by Otto
Is such a background possible with pure FIVEWIN code.
Posted: Thu Dec 13, 2007 4:12 pm
by Antonio Linares
Yes, using a brush
Posted: Thu Dec 13, 2007 4:18 pm
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
Posted: Thu Dec 13, 2007 4:37 pm
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>
Posted: Fri Dec 21, 2007 7:54 am
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
Posted: Fri Dec 21, 2007 9:59 am
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
Posted: Fri Dec 21, 2007 10:31 am
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
Posted: Fri Dec 21, 2007 1:07 pm
by Antonio Linares
Otto,
Its a simple solution, though we could improve it:
http://www.hotshare.net/file/24901-201766470d.html