Hi,
I'm trying to add or delete menu items (e.g. qx.ui.menu.Button) to/from
a qx.ui.menu.Menu while the menu is currently seeable. Unfortunately,
the width of the menu is not updated. As a result, if one of the added
menu items is larger than the existing menu, the menu appears with its
old width (see attached screenshot). Calling menu.pack() after adding
items doesn't help.
Is this generally impossible to add menu items while the menu is seeable
or is there any way to refresh the menu bounds after adding items?
Some (although not very useful) code to reproduce:
// set up context-menu
var cmenu = new qx.ui.menu.Menu();
cmenu.addToDocument();
// setup initial item
var m_1 = new qx.ui.menu.Button( "Simple" );
cmenu.add( m_1 );
m_1.addEventListener( "mouseover", function( e ) {
var item = new qx.ui.menu.Button( "Additional Item" );
this.add( item );
}, cmenu );
// show the context-menu to widget w
w.setContextMenu( cmenu );
w.addEventListener( "contextmenu", function( e ) {
this.getContextMenu().setLeft( e.getClientX() );
this.getContextMenu().setTop( e.getClientY() );
this.getContextMenu().setOpener( this );
this.getContextMenu().show();
}, w );
Thanks in advance,
Ralf

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel