I'm trying to use this component: Colorpick button (xtype: colorbutton)
I'm pretty new to ExtJS and I don't know how and where to correctly define this type of button. Where should I put the source code and how should I include it correctly ?
I'm using ExtJS 6.0.0 for a webmapping application. I have the "ext-6.0.0" folder in the directory where I have my web pages so that I can include easily the ext-all.js file.
My main javascript file which contains all my panels has 2 mains components:
Ext.require([
'GeoExt.component.Map',
'GeoExt.data.store.LayersTree',
]);
and
Ext.application({
name: 'BasicTree',
launch: function(){
[... all my code here ...]
}
})
This file (named panel.js) is included in my index.html file.
Thank you !
It works like every other component. When you want to use a normal button, you would look into the docs, which tell you
Ext.button.Button xtype: button, and then you writeIn this case, the docs state
Ext.ux.colorpick.Button xtype: colorbutton, so you writeFor this to work, you have to have the file
because otherwise the UX component cannot be loaded. UX components are, unlike most other Ext components, not part of
ext-all.js.