Page 1 of 1

MsgBar How To make it Gradient

Posted: Sat Apr 14, 2012 3:09 am
by fraxzi
MsgBar 2010 color is default.. how can I make it custom or define my own gradient?

Re: MsgBar How To make it Gradient

Posted: Sat Apr 14, 2012 9:42 am
by ukoenig
Hello Fraxzi,

I got it working, using any Brush ( Color, Gradient, Bmp, Image )
Like You can see, the Brush is painted.
I still need to show the Text transparent,
otherwise the background is covered with Clrpane from Text.
The Text is shown transparent using : oMsgbar:l2007 := .T.

Image

Image

Using a JPG-image the Image is painted on the Messagebar as well, but covered from Text-background.
I only need a transparent Text !!!!!

Image

Best Regards
Uwe :?:

Re: MsgBar How To make it Gradient

Posted: Sat Apr 14, 2012 11:48 am
by Antonio Linares
Frances,

Simply implement your own function MsgBar2010() that returns the handle of the bitmap to use as gradient :-)

i.e.:

function MsgBar2010()

return ReadBitmap( 0, "mygradient.bmp" )

Re: MsgBar How To make it Gradient

Posted: Sat Apr 14, 2012 8:11 pm
by ukoenig
Antonio,

Thank You very much, it works fine.
The only problem because of a stretched BMP, there is no control of the grad-color-positions.
Using BMP's like blustone.bmp, granit.bmp or marble.bmp must be repainted to msgbar-length
because of stretching.
With my brush-solution it would work, but there is the transparent-text problem.

Image

Image

using a repainted < blustone.bmp >

Image

The used BMP's :

Image

Image

Image

Best Regards
Uwe :lol: