Click here to Skip to main content
15,887,278 members
Articles / Multimedia / GDI+
Article

AlphaGradientPanel, an extended panel

Rate me:
Please Sign up or sign in to vote.
4.63/5 (64 votes)
24 Mar 2006CPOL 268.1K   10.5K   122   79
A panel that has rounded borders, gradients, and transparency.

Image 1

Introduction

This is a panel, first of all. Therefore, it has all the advantages of a panel, plus some nice little features.

Using the code

You'll just have to include the component in your toolbox and use it.

The only property that is a bit special is the Colors() property. It is a collection of items and has design-time visibility in the property grid. I'm still trying to achieve transforming the color name that appears in the property grid in a nice drawing... If anybody knows how that can be achieved, please, please, please, let me know ;)

Features

  • Rounded corners (any one of them or all at the same time).
  • Gradients (from 2 to n colors, with some special effects).
  • Transparency (any color can be made transparent with an "Alpha" value between 0 and 255).
  • Borders, even with rounded corners, have a nice little border.
  • Image inclusion (position, opacity, size, grayscale, and padding).
  • Padding of the content, of the back, and of the docking.

History

  • Version 1.0.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Switzerland Switzerland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralRe: Nice control Pin
the-rpd28-Jun-07 6:40
the-rpd28-Jun-07 6:40 
GeneralUse in applications Pin
BryanTKinkel12-Jun-07 3:40
BryanTKinkel12-Jun-07 3:40 
AnswerRe: Use in applications Pin
Nicolas Wälti12-Jun-07 3:55
Nicolas Wälti12-Jun-07 3:55 
GeneralRe: Use in applications Pin
BryanTKinkel13-Jun-07 4:29
BryanTKinkel13-Jun-07 4:29 
GeneralRe: Use Commercial in applications Pin
Matt Lowrance26-Sep-07 6:39
Matt Lowrance26-Sep-07 6:39 
GeneralRe: Use Commercial in applications Pin
Nicolas Wälti26-Sep-07 20:19
Nicolas Wälti26-Sep-07 20:19 
GeneralPanel behind not visible Pin
JonnyNordin9-Jun-07 2:17
JonnyNordin9-Jun-07 2:17 
Questionmodify color( ) with code ? Pin
Hqrts30-May-07 0:56
Hqrts30-May-07 0:56 
hello i am using your alphagradientpanel, and it is working pretty well, but I would like to change some things in the property colors() thank to the code.
can you explain me how to do that.
thank you Smile | :)

mraviator >>>> i noticed that if you copy the alphagradientpanel in an other panel, then it works.

excuse my english ^^
GeneralTra sparency Pin
spaceboy17-May-07 4:55
spaceboy17-May-07 4:55 
QuestionPanel Bugs [modified] Pin
tricos26-Mar-07 8:44
tricos26-Mar-07 8:44 
GeneralProblem when copying control Pin
mraviator26-Feb-07 11:06
mraviator26-Feb-07 11:06 
AnswerRe: Form appearance Pin
Nicolas Wälti26-Sep-06 3:06
Nicolas Wälti26-Sep-06 3:06 
QuestionAlpha Gradient Panel ? Pin
Zaegra9-Aug-06 2:23
Zaegra9-Aug-06 2:23 
QuestionCan I plead ignorance? Please!? Pin
HankFrid7-Aug-06 12:08
HankFrid7-Aug-06 12:08 
AnswerRe: Can I plead ignorance? Please!? Pin
Nicolas Wälti7-Aug-06 22:05
Nicolas Wälti7-Aug-06 22:05 
QuestionRe: Can I plead ignorance? Please!? Pin
852y3agnna6-Jan-07 15:37
852y3agnna6-Jan-07 15:37 
GeneralBeautifully Done Pin
Joshua Boyle4-Aug-06 9:29
Joshua Boyle4-Aug-06 9:29 
QuestionNot a Microsoft.NET Module? Pin
vaderjm3-Aug-06 16:26
vaderjm3-Aug-06 16:26 
AnswerRe: Not a Microsoft.NET Module? Pin
Nicolas Wälti3-Aug-06 21:32
Nicolas Wälti3-Aug-06 21:32 
GeneralRe: Not a Microsoft.NET Module? Pin
vaderjm5-Aug-06 5:23
vaderjm5-Aug-06 5:23 
GeneralRe: Not a Microsoft.NET Module? Pin
vaderjm5-Aug-06 5:52
vaderjm5-Aug-06 5:52 
GeneralSmall problem Pin
Danilo Corallo6-Jul-06 12:46
Danilo Corallo6-Jul-06 12:46 
AnswerRe: Small problem Pin
Nicolas Wälti29-Jul-06 6:33
Nicolas Wälti29-Jul-06 6:33 
GeneralCan't load in VB Express Pin
Apopka_Pilot25-May-06 10:43
Apopka_Pilot25-May-06 10:43 
GeneralRe: Can't load in VB Express Pin
seanwright5-Jul-06 5:05
seanwright5-Jul-06 5:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.