Click here to Skip to main content
15,884,176 members
Articles / Programming Languages / Visual Basic
Article

Nice Color Palette Control (C#&VB.NET) .

Rate me:
Please Sign up or sign in to vote.
3.88/5 (5 votes)
3 Dec 20062 min read 49.2K   1.4K   23   4
C# and VB.NET source code of Nice Color Palette control.
Sample image

Introduction

In version 2007.10 of X-Component packages (3 rich libraries of UI controls for .NET with MAC style, XP style...), there are many color controls with advance features. I show here how to develop one of these color controls with source code of Color Palette control.

<st1:place w:st="on">Main Features:

  • You can change cell number in top side of control.
  • You can change cell number in bottom side of control. .
  • You can change cell size.
  • You can change left color.
  • You can change right color.
  • Cell color tool tip.

To explore features of this Color control, just download and run the Demo program.

Control Properties

Property

Description

DarkColor

Gets or sets the dark color of this control.

EdgeSize

Gets or sets size of the cell edge in pixel.

LightColor

Gets or set the light color of this control.

LowerEdgeCount

Gets or sets the number of the lower edges connected to the graph vertex (undirected graph)

SelectedColor

Gets the color which is selected.

UpperEdgeCount

Gets or sets the number of the upper edges connected to the graph vertex (undirected graph)

Control Methods

Methods

Description

ClearSelected

Unselects all items in this control.

Control Events

Event

Description

ColorCellSelected

Occurs when a color cell is selected.

Using The Control

+ Download the source code and unzip it.

+ Open VS.NET's Tool menu and select "Add/Remove ToolBox Items".

+ Click "Browse", and navigate to the ColorPaleteControl.dll in the bin\Release directory of the source code.

+ Click Open and then OK, the ColorPalette control will now be in your ToolBox. Just drag the control onto your form to use it.

+ Set the control's properties, and coding an event handle, and you press F5 to run your program.

Conclusion

I hope others find this control useful. Please feel free to report errors, issues, or requests.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
Manager of X-Component (MAC-UI Suite, XP-UI Suite, IDE-UI Suite...)
URL: http://www.x-component.com

Comments and Discussions

 
GeneralI'm getting an overflow error msg Pin
SMizan28-May-09 6:30
SMizan28-May-09 6:30 
GeneralHello Pin
rak@198711-Mar-09 19:51
rak@198711-Mar-09 19:51 
General:) Pin
Hari Om Prakash Sharma3-Dec-06 23:25
Hari Om Prakash Sharma3-Dec-06 23:25 
GeneralGood One Pin
aamironline3-Dec-06 21:45
aamironline3-Dec-06 21:45 

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.