# ColorMenu.js

    /**
     * @class Ext.menu.ColorMenu
     * @extends Ext.menu.Menu
     * A menu containing a {@link Ext.menu.ColorItem} component (which provides a basic color picker).
     * @constructor
     * Creates a new ColorMenu
     * @param {Object} config Configuration options
     */
    Ext.menu.ColorMenu = function(config){
        Ext.menu.ColorMenu.superclass.constructor.call(this, config);
        this.plain = true;
        var ci = new Ext.menu.ColorItem(config);
        this.add(ci);
        /**
         * The {@link Ext.ColorPalette} instance for this ColorMenu
         * @type ColorPalette
         */
        this.palette = ci.palette;
        /**
         * @event select
         * @param {ColorPalette} palette
         * @param {String} color
         */
        this.relayEvents(ci, ["select"]);
    };
    Ext.extend(Ext.menu.ColorMenu, Ext.menu.Menu, {
        //private
        beforeDestroy: function(){
            this.palette.destroy();
        }
    });

Ext - Copyright © 2006-2007 Ext JS, LLC
All rights reserved.