PDA

View Full Version : No id for separator



stever
12 Apr 2007, 4:55 PM
In a menu where I have a separator with an id, I can't get it to hide it:


menu = new Ext.menu.Menu({
items:
[
{
text: 'sample'
},
new Ext.menu.Separator({
id: 'Separator'
}),
{
text: 'samp2'
}


menu.items.get('Separator') does not return it....

Also, it might be nice if just before showing a menu, the menu looked for separators that are at the very top or very bottom and hide them. Same with two separators together.

The whole reason behind this is that I have two items at the bottom of a menu that are hidden and there a separator just before them. So I need to hide it too so the menu doesn't look funny...

jack.slocum
12 Apr 2007, 6:06 PM
The Separator class didn't accept a config so your config was ignored. I have changed it in SVN and your code should now work.

stever
12 Apr 2007, 6:10 PM
:D