Hi,

I'm using an Ext.menu.ColorMenu as a context menu item on right clicking on a tree.

Each item within the tree can use this submenu.

However once i've selected a colour for one item in the tree, the previous colour is still selected in the colour menu and I can't reselect it again, but I can choose a different colour.

Below is the code that am I using. Is this the correct method, and if so is there a way to deselect the chosen colour in the colour menu?

PHP Code:
var colorMenu = new Ext.menu.ColorMenu({
        
handler: function(cmcolor){
             
//my code here
        
}
});

       var 
menu = new Ext.menu.Menu({
        
id'mainMenu',
        
style: {
            
overflow'visible'
        
},
        
items: [
           {
                
text'Choose a Color',
                
iconCls'color-picker-icon-small',
                
menucolorMenu
            
}
        ]
    });

MenuPanel = function(title,treedata) {
    
MenuPanel.superclass.constructor.call(this, {
        
bordertrue,
        
autoScrolltrue,
        
tbardeviceToolbar,
        
animatefalse,
        
rootVisible:false,
        
collapseMode:'mini',
        
collapsed:false,
        
linestrue,
        
useArrowstrue,
        
loader: new Ext.tree.TreeLoader(),
//        cls: 'menu-tree',
        
root: new Ext.tree.AsyncTreeNode({
                
id:'source'
        
}),
        
listeners: {
                
contextmenu: function(node,e){
                        var 
analog = /analog/gi;

                        if(
node.parentNode.id.match(analog))
                        {
                                if(
node.attributes.checked === true)
                                {
                                        var 
nodeidArray node.id.split('^');
                                        var 
graphid nodeidArray[1];
                                        
selectedContextGID graphid//used in colorMenu function

                                        
node.select();
                                        
menu.contextNode node;
                                        
menu.showAt(e.getXY());
                                }
                        }
                }
         }
         })
};