PDA

View Full Version : [CLOSED] Friendly color picker in V2?



feanor91
May 24, 2012, 2:25 PM
Hello

is something like that http://ryanpetrello.com/ext-ux/ColorField/ has a chance to be implemented in V2?

Daniil
May 24, 2012, 3:36 PM
Hi,

I would assume it's possible.

Probably, this extension has been already ported to ExtJS 4 (Ext.NET v2 is based on ExtJS 4).

I would ask the author of this ColorField extension it has been ported or not.

feanor91
May 24, 2012, 3:40 PM
Hi

I found nothin in Ext.JS example. For now, I manage to made one with a colorpicker into a dropdownfield. I dadapt your example. It works well, but it's a little less pretty.

One question about color picker: it shows only basic web colors?

Daniil
May 24, 2012, 3:59 PM
Please use the Colors property.

Example

<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
this.ColorPicker1.Colors = new string[]
{
"000000", "AAAAAA", "FFFFFF"
};
}
</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<ext:ResourceManager runat="server" />

<ext:ColorPicker ID="ColorPicker1" runat="server" />
</body>
</html>



See also
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.picker.Color-property-colors

feanor91
May 24, 2012, 4:53 PM
Ok, I see, thanks