Gradient Backgrounds

  • Thread starter Thread starter Phil Jones
  • Start date Start date
P

Phil Jones

How would I go about setting a gradient (from Color A to Color B) as a
background for something like a panel?

I don't want to resort to using XP-themes (so that it'll run on pre-XP
systems). Basically I have some 3rd party controls that have gradient
backgrounds - but I need to be able to repeat this effect in other parts of
my UI.

Many thanks for any advice anyone might have....

===
Phil
(Auckland | Aotearoa)
 
* "Phil Jones said:
How would I go about setting a gradient (from Color A to Color B) as a
background for something like a panel?

I don't want to resort to using XP-themes (so that it'll run on pre-XP
systems). Basically I have some 3rd party controls that have gradient
backgrounds - but I need to be able to repeat this effect in other parts of
my UI.

Have a look at the 'LinearGradientBrush' class. You can create such a
brush and fill the control's region in its 'OnPaint' method or 'Paint'
event handler.
 
Cool....that sounds simple. Thanks for the point in the right direction -
much appreciated.

Cheers,
===
Phil : NZ
 
* "Phil Jones said:
Cool....that sounds simple. Thanks for the point in the right direction -
much appreciated.

.... but please don't open new threads on the same topic :-).
 
Back
Top