|
Pick a color from the combobox:
|
|
|
This text has the same color that is stored in the combobox.
|
| | |
|
This example uses a custom color picker control inside a Custom option of the Combobox.
To download the color picker control, please visit this website http://colourmod.com
| | |
ASP.NET
<obout:Combobox id="cbo1" OnClientChange="changeTextColor()" runat="server"> <CustomOptions> <obout:Custom runat="server"> ... color picker code here </obout:Custom> </CustomOptions> </obout:Combobox>
|
| | |
JavaScript
When the color is changed, the Value of the combobox is updated.
This triggers the OnClientChange event.
<script type="text/javascript"> function changeTextColor() { document.getElementById("divText").style.color = "#" + cbo1.getValue(); } </script>
|
| | |
The code of the selected color is stored in the Value of the combobox.
This way, it is available both server-side and client-side.
Tip: To close the combobox after selecting a color, click on the arrow button.
|
| | |
| "I must admit that your components are the most intuitive I've ever used
your product suite is really great, but equally important,
the support is even better! :)" |
Michael Holm Andersen |
| M media |
| | |
|