- Online Barcode Generator
- How To
- Buy Now
By using KT.UI for ASP.NET ColorEditor control, users can let the control self automatically decide the width and column of color palette or customize the color editor width and columns according to your own needs within ASP.NET AJAX application with the sample codes displayed in this page.
Technically speaking, the size of the color boxes in the palette is automatically calculated according to the Columns property to fit the given Width property by the ColorEditor component. The width and height of each box in the color palette is in the same value. By default, the size of each color box is 15 x 15 pixels. The value for each color box within ASP.NET application is in the same as ColorEditor width and columns setting in C# project.
How to Set Columns Using ASP.NET ColorEditor
Users are able to set the colors displayed in the color palette by using the Columns property in order to render the colors in appropriate color groups. By default, users can set this property as Preset that will automatically set the appropriate Columns property value so that the preset palette is rendered correctly.
When users don't evoke and set Column custom property, the columns value in the color palette is decided automatically by Preset.
Following corresponding ASPX codes are for set ColorEditor column by default.
When users choose to customize color collection, you can set and render the colors by setting the appropriate Columns property value.
Sample ASPX codes below are provided to guide users to program your own ColorEditor column customizing project.
How to Set Width Using ASP.NET ColorEditor
When users don't set the color box width, the size of the color boxes in the color palette is automatically set based on the column property to fit the default width property. And of course, like color column, users are also free to set color box width with the assistant sample ASPX codes.
If the width property is not customized, ColorEditor will set it according to the appropriate default value. Please refer to following demo codes to see how to set color width like Preset required.
When users start to set Width property, the size of each color cell will be in accordance with each adjusted width. See following sample codes for adjusting width property.
ASP.NET AJAX UI Controls