PDA

View Full Version : Ext.menu.Menu() auto width



arthurakay
25 Aug 2009, 6:55 AM
I'm seeing an issue in IE6 with the width of my Toolbar menus. I know I have to be doing something wrong, but for the life of me I can't find it. (BTW, I just migrated my application from 2.2.1 to 3.0... so could be some migration issue).

The problem (I think) is that the menus are getting the CSS property "width: auto;" assigned inline to the DIV which wraps the menu.



<div id="ext-comp-1018" class="x-menu x-menu-floating x-layer" style="position: absolute; z-index: 15000; visibility: visible; left: 212px; top: 159px; width: auto;"> ... </div>


Here's how I build the menu:


var defaultGridPanelActionMenu = new Ext.menu.Menu({
allowOtherMenus: true,
ignoreParentClicks: true,
items: [
{
text: 'test',
handler: function() {}
},
{
text: 'test',
handler: function() {}
}
]
});

...

var defaultToolbarItems = [];
defaultToobarItems.push({
text: 'Actions',
iconCls: 'tasks',
menu: defaultGridPanelActionMenu
});

...

var defaultGridToolbar = new Ext.Toolbar(defaultToobarItems);

...

var myGrid = new Ext.grid.EditorGridPanel({
...
tbar: defaultGridToolbar,
...
});


When I try to use the "width" config option on the Menu() class it doesn't seem to do anything. Firebug doesn't show any conflicting CSS definitions either.

Any ideas to point me in the right direction?

arthurakay
25 Aug 2009, 7:39 AM
SOLVED. I had an override "fix" from Ext 2.2.1 which caused this. The "fix" is no longer needed in 3.0, and removing it fixed my problem.