KolorPicker Documentation
|
Version 2.7 - August 18, 2004
Download -
Buy
|
Introduction
KolorPicker is an ASP.net Web Control for visual
color selection.
|
-
Features four popular color palettes: Basic, Web safe, Gradient, and Greys
-
Palette may be shown or hidden (pops up with a mouse-click)
-
HTML color code may show or not
-
Allows multiple instances on one page
-
The code is completely self-contained, no external script files or
images are required
-
Rendered HTML and Javascript are optimized for fast download
-
Includes support for postbacks, server-side events, and viewstate
-
Supports Internet Explorer and Netscape browsers
|
Properties
Property |
Description |
AllowTyping
|
Determines if the user can enter values (at run-time)
using the keyboard.
|
BackColorPalette
|
Backcolor of the color palette.
|
ClickJavaScript
|
JavaScript to be called on the client when the palette is clicked. This property
is useful for client-side event processing.
For example: ClickJavaScript= "alert('You selected '+obj.id)"
|
Palette
|
Color palette to choose from. Possible values are as
follow:
|
PopUpPalette
|
Determines if the palette is always visible or only
pops up when the color button is clicked.
|
SelectedColor
|
The currently selected color. SelectedColor is of
type Color (System.Drawing.Color). It is the default property of the
control.
|
ShowColorCode
|
Determines whether the textbox with the color code
shows or not. It become very useful when screen real estate is an
issue.
|
In addition, all the usual properties of a web control apply (inherited from
System.Web.UI.WebControls.WebControl).
KolorPicker provide one Enumeration.
Enumeration |
Possible Values |
KPalette |
-
Basic = 0
-
WebSafe = 1
-
Gradient = 2
-
GreyScale = 3
|
Events
KolorPicker provides 2 events: Click and ColorChanged.
Event |
Description |
Click |
Triggered, when the user clicks a color. This
event is only triggered when AutoPostBack is set to True.
|
ColorChanged
(default event) |
Triggered on Postback if the currently selected color is different from the
previously selected color.
|
Methods
KolorPicker provides 1 public method: SelectedColorHTML.
Method |
Description |
SelectedColorHTML
|
Returns a String containing the HTML value of the property SelectedColor. Using
SelectedColorHTML instead of SelectedColor (of
type System.Drawing.Color) saves you the hassle of type conversion.
|
Installation and Licensing
All you need to do is copy the KolorPicker.DLL file to the bin directory of your
web site or web application. No other files are needed.
To convert an evaluation copy into a full-use license, create a text file
in the same directory as the assembly DLL called Kakoo.KolorPicker.LIC. Place
the license key, which you will receive by email upon purchase, in this text
file and save it.
Embedding the Control into the Page
To embed the control, you will copy the control DLL into the bin directory of
your web application and add two lines of code to your page. The first
line registers the control tag prefix (place this at the top of the page):
<%@ Register TagPrefix
="kakoo" Namespace = "Kakoo"
Assembly = "KolorPicker" %>
The second line embeds the KolorPicker control (place anywhere within the page):
<kakoo:KolorPicker id
= "DBReporter1" runat = "server"
Palette = "WebSafe"
SelectedColor = "#FFFFFF"
PopUpPalette = "True" >
</ kma:KolorPicker>
With Visual Studio .Net, you can use drag & drop to embed the control into
your page. This option requires that the control has been added to the Toolbox.
To add a control to the Toolbox, perform the following steps:
 |
-
Open an .ASPX page in Design view, and make the Web Forms tab active in the
Toolbox.
-
Right-Click the Toolbox, click Add/Remove Items...
-
In the Customize Toolbox dialog box click the Browse button on the lower right
below the components list.
-
Navigate to the directory that contains the assembly into which your controls
are, and click the name of that assembly (for example,
C:\Kakoo\KolorPicker.dll).
-
Click OK to close the dialog box. The control now appears in the Toolbox under
the Web Forms tab.
|
Browser Compatibility
KolorPicker has been successfully tested on the following browsers:
-
Internet Explorer 6.0
-
Netscape Navigator 7.0
|