3 * Copyright(c) 2006-2009 Ext JS, LLC
5 * http://www.extjs.com/license
8 * @class Ext.menu.ColorMenu
\r
9 * @extends Ext.menu.Menu
\r
10 * A menu containing a {@link Ext.ColorPalette} Component.
\r
13 Ext.menu.ColorMenu = Ext.extend(Ext.menu.Menu, {
\r
15 * @cfg {Boolean} enableScrolling
\r
18 enableScrolling: false,
\r
21 * @cfg {Boolean} hideOnClick
\r
22 * False to continue showing the menu after a color is selected, defaults to true.
\r
27 * @cfg {Number} maxHeight
\r
31 * @cfg {Number} scrollIncrement
\r
36 * @type ColorPalette
\r
37 * The {@link Ext.ColorPalette} instance for this ColorMenu
\r
51 initComponent: function(){
\r
54 showSeparator: false,
\r
55 items: this.palette = new Ext.ColorPalette(this.initialConfig)
\r
57 this.palette.purgeListeners();
\r
58 Ext.menu.ColorMenu.superclass.initComponent.call(this);
\r
59 this.relayEvents(this.palette, ['select']);
\r
60 this.on('select', this.menuHide, this);
\r
62 this.on('select', this.handler, this.scope || this)
\r
66 menuHide: function(){
\r
67 if(this.hideOnClick){
\r
72 Ext.reg('colormenu', Ext.menu.ColorMenu);