By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,326 Members | 838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,326 IT Pros & Developers. It's quick & easy.

Elipse style fill gradient in a rectangle?

P: n/a
Hi does anyone know how to fill a rectangle with an ellipse style fill (ie so it gives a spotlight effect on a rectange?)

I know how to create rectangles, ellipses etc and I can fill the rect with an oversized ellipse, but given how far over the edge of the view it has to go, it loses the defining edges on the colours..... I need the fill to go out as far as the outer ellipse colour, and then the rest of the visible form take that colour.... I tried just setting the background colour on the form directly as an easy option, but that in turn discoloursmy flat buttons..... doh!

Please help.....

Cheers
Adam

Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

Try drawing the forms background in the paint event instead of
setting the back color.

Ken
-----------------------
"Adam Maltby" <ad***@frfl.co.uk> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
Hi does anyone know how to fill a rectangle with an ellipse style fill (ie
so it gives a spotlight effect on a rectange?)

I know how to create rectangles, ellipses etc and I can fill the rect with
an oversized ellipse, but given how far over the edge of the view it has to
go, it loses the defining edges on the colours..... I need the fill to go
out as far as the outer ellipse colour, and then the rest of the visible
form take that colour.... I tried just setting the background colour on the
form directly as an easy option, but that in turn discolours my flat
buttons..... doh!

Please help.....

Cheers
Adam
Nov 21 '05 #2

P: n/a
Ken,

Thanks matey! So obvious, right under my nose i never even considered it! Doh!

Thanks again!
Adam

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.