PDA

View Full Version : Colorpicker in extjs 3.4



Vamshi Barana
16 Oct 2013, 3:22 AM
Hi,

How to use colorpicker inside the form in extjs 3.4.Can anybody help me in this...


Regards,
Vamshi

slemmon
17 Oct 2013, 3:30 PM
I take it you're wanting to use an Ext.ColorPalette widget, correct?
http://docs.sencha.com/extjs/3.4.0/#!/api/Ext.ColorPalette

Vamshi Barana
17 Oct 2013, 8:50 PM
Hi Slemmon ,
Thanku for the reply.I go the Solution.


var colorAndDateHandler = function(menuItem, choice) {
// Ext.MessageBox.alert('', 'Your choice is ' + choice+menuItem);
Ext.getCmp('colorcode').setValue(choice);


}

//in form

{
xtype : 'splitbutton',
text : 'Click Color',
disabled: false,
itemId : 'splitbut',
menu : [{
text : 'Choose Color',
menu : {
xtype : 'colormenu',
handler : colorAndDateHandler,
listeners : {
click: function() {
return false;
}
}
}

}]
},

Above is the Solution.

Thanks,
Vamshi