Click here to Skip to main content
11,929,950 members (50,513 online)
Click here to Skip to main content
Add your own
alternative version


118 bookmarked

AlphaGradientPanel, an extended panel

, 24 Mar 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
A panel that has rounded borders, gradients, and transparency.


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 Wink | ;)


  • 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.


  • Version 1.0.


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


About the Author

Nicolas Wälti
Software Developer (Senior)
Switzerland Switzerland
No Biography provided

You may also be interested in...

Comments and Discussions

Questionimage alpha question Pin
bekiser1-May-13 8:23
memberbekiser1-May-13 8:23 
SuggestionA few changes needed to get this to work in .Net 4 Pin
Jonathan_Collins6-Jun-12 23:55
memberJonathan_Collins6-Jun-12 23:55 
GeneralMy vote of 2 Pin
Brad Barnhill6-Jan-12 17:49
memberBrad Barnhill6-Jan-12 17:49 
GeneralMy vote of 2 Pin
Dave Kreskowiak8-Apr-10 7:37
mvpDave Kreskowiak8-Apr-10 7:37 
QuestionIssue removing control from form(s) Pin
David Minder22-Dec-09 6:09
memberDavid Minder22-Dec-09 6:09 
QuestionOver controls??? Pin
Member 247284813-Oct-09 10:53
memberMember 247284813-Oct-09 10:53 
Generalfrustrating Pin
joe destefano8-May-09 12:45
memberjoe destefano8-May-09 12:45 
vista ultimate, vstudio 2005

cant make a simple 100% transparent panel. what the heck am i doing wrong?

its always just a gray panel
GeneralRe: frustrating Pin
joe destefano8-May-09 12:59
memberjoe destefano8-May-09 12:59 
GeneralRe: frustrating Pin
David Minder22-Dec-09 5:16
memberDavid Minder22-Dec-09 5:16 
QuestionAdding an AlphaGradientPanel at runtime? Pin
SMothes29-Sep-08 5:38
memberSMothes29-Sep-08 5:38 
AnswerRe: Adding an AlphaGradientPanel at runtime? Pin
Nick Waelti1-Oct-08 2:10
memberNick Waelti1-Oct-08 2:10 
GeneralTransparency problem Pin
zuraw13-Mar-08 5:06
memberzuraw13-Mar-08 5:06 
GeneralRe: Transparency problem Pin
cdebel26-Feb-09 10:49
membercdebel26-Feb-09 10:49 
QuestionException Pin
BBWicked1-Aug-07 0:46
memberBBWicked1-Aug-07 0:46 
Generalsorry but :) Pin
deltadirac29-Jul-07 9:05
memberdeltadirac29-Jul-07 9:05 
QuestionRemoving a color Pin
the-rpd1-Jul-07 6:20
memberthe-rpd1-Jul-07 6:20 
GeneralNice control Pin
the-rpd26-Jun-07 10:38
memberthe-rpd26-Jun-07 10:38 
GeneralRe: Nice control Pin
(Nick Waelti)28-Jun-07 1:11
member(Nick Waelti)28-Jun-07 1:11 
GeneralRe: Nice control Pin
the-rpd28-Jun-07 7:40
memberthe-rpd28-Jun-07 7:40 
GeneralUse in applications Pin
BryanTKinkel12-Jun-07 4:40
memberBryanTKinkel12-Jun-07 4:40 
AnswerRe: Use in applications Pin
Nick Waelti12-Jun-07 4:55
memberNick Waelti12-Jun-07 4:55 
GeneralRe: Use in applications Pin
BryanTKinkel13-Jun-07 5:29
memberBryanTKinkel13-Jun-07 5:29 
GeneralRe: Use Commercial in applications Pin
Matt Lowrance26-Sep-07 7:39
memberMatt Lowrance26-Sep-07 7:39 
GeneralRe: Use Commercial in applications Pin
Nick Waelti26-Sep-07 21:19
memberNick Waelti26-Sep-07 21:19 
GeneralPanel behind not visible Pin
JonnyNordin9-Jun-07 3:17
memberJonnyNordin9-Jun-07 3:17 
Questionmodify color( ) with code ? Pin
Hqrts30-May-07 1:56
memberHqrts30-May-07 1:56 
GeneralTra sparency Pin
spaceboy17-May-07 5:55
memberspaceboy17-May-07 5:55 
QuestionPanel Bugs [modified] Pin
tricos26-Mar-07 9:44
membertricos26-Mar-07 9:44 
GeneralProblem when copying control Pin
mraviator26-Feb-07 12:06
membermraviator26-Feb-07 12:06 
AnswerRe: Form appearance Pin
Nick Wälti26-Sep-06 4:06
memberNick Wälti26-Sep-06 4:06 
QuestionAlpha Gradient Panel ? Pin
Zaegra9-Aug-06 3:23
memberZaegra9-Aug-06 3:23 
QuestionCan I plead ignorance? Please!? Pin
HankFrid7-Aug-06 13:08
memberHankFrid7-Aug-06 13:08 
AnswerRe: Can I plead ignorance? Please!? Pin
Nick Wälti7-Aug-06 23:05
memberNick Wälti7-Aug-06 23:05 
QuestionRe: Can I plead ignorance? Please!? Pin
852y3agnna6-Jan-07 16:37
member852y3agnna6-Jan-07 16:37 
GeneralBeautifully Done Pin
Joshua Boyle4-Aug-06 10:29
memberJoshua Boyle4-Aug-06 10:29 
QuestionNot a Microsoft.NET Module? Pin
vaderjm3-Aug-06 17:26
membervaderjm3-Aug-06 17:26 
AnswerRe: Not a Microsoft.NET Module? Pin
Nick Wälti3-Aug-06 22:32
memberNick Wälti3-Aug-06 22:32 
GeneralRe: Not a Microsoft.NET Module? Pin
vaderjm5-Aug-06 6:23
membervaderjm5-Aug-06 6:23 
GeneralRe: Not a Microsoft.NET Module? Pin
vaderjm5-Aug-06 6:52
membervaderjm5-Aug-06 6:52 
GeneralSmall problem Pin
Danilo Corallo6-Jul-06 13:46
memberDanilo Corallo6-Jul-06 13:46 
AnswerRe: Small problem Pin
Nick Wälti29-Jul-06 7:33
memberNick Wälti29-Jul-06 7:33 
GeneralCan't load in VB Express Pin
Apopka_Pilot25-May-06 11:43
memberApopka_Pilot25-May-06 11:43 
GeneralRe: Can't load in VB Express Pin
seanwright5-Jul-06 6:05
memberseanwright5-Jul-06 6:05 
QuestionUsage Requirements Pin
rdesigner19-May-06 11:44
memberrdesigner19-May-06 11:44 
AnswerRe: Usage Requirements Pin
Nick Wälti20-May-06 5:37
memberNick Wälti20-May-06 5:37 
QuestionHelp Pin
j.channon17-May-06 0:56
memberj.channon17-May-06 0:56 
GeneralDude, this is tight! Pin
serialc0d310-May-06 4:26
memberserialc0d310-May-06 4:26 
GeneralRe: Dude, this is tight! Pin
Nick Wälti10-May-06 4:31
memberNick Wälti10-May-06 4:31 
GeneralThanks :) Pin
blroy521127-Apr-06 4:40
memberblroy521127-Apr-06 4:40 
GeneralRe: Thanks :) Pin
Nick Wälti29-Jul-06 7:35
memberNick Wälti29-Jul-06 7:35 

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.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151126.1 | Last Updated 24 Mar 2006
Article Copyright 2006 by Nicolas Wälti
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid