|
Hi all, I am inserting below a small piece of code that shows
that a menu will not recalculate its width if an item has been added to it
since the last time it popped up. It looks like the width of a menu is only calculated
before the first time it shows (I’m using QooXdoo 0.5.2 with Firefox on a
Windows XP Pro SP2 machine) Try the code below two ways :
OR
Thanks, Laurent. Here goes the code… window.application.main = function() { // Main container var mainContainer = new QxBoxLayout(); mainContainer.setOrientation(QxConst.ORIENTATION_VERTICAL); mainContainer.setWidth('100%'); mainContainer.setHeight('auto'); mainContainer.setSpacing(20); window.application.add(mainContainer); // Menu bar var menuBar = new
QxMenuBar(); menuBar.setWidth("100%"); menuBar.setHeight("auto"); // "File" menu var menuFile = new QxMenu(); window.application.add(menuFile); // "About..." item var menuFileAbout = new QxMenuButton(); menuFileAbout.setLabel('About...'); menuFile.add(menuFileAbout); // Separator var separator = new QxMenuSeparator(); menuFile.add(separator); // "Quit" item var menuFileQuit = new QxMenuButton(); menuFileQuit.setLabel('Quit'); menuFile.add(menuFileQuit); // Menu bar button var menuButton =new QxMenuBarButton(); menuButton.setLabel('File'); menuButton.setMenu(menuFile); menuBar.add(menuButton); // Insert menu bar in DOM mainContainer.add(menuBar); // "Add Item" button var addItemButton = new QxButton('Add
long-text item'); addItemButton.addEventListener('execute',
function(){ var longMenuItem = new
QxMenuButton(); longMenuItem.setLabel('Menu
width will not adapt to this item\'s width if menu has already shown'); menuFile.add(longMenuItem); }); mainContainer.add(addItemButton); } Téléphone : 06.70.68.37.63 Email : [EMAIL PROTECTED] Skype : ldonstetter ************************************************************************** Ce message et toutes les pièces jointes sont confidentiels
et établis à l'attention exclusive de leurs destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. Nous déclinons toute responsabilité au titre de ce message
s'il a été altéré, déformé ou falsifié. Ce message et ses pièces jointes ne contiennent, a priori,
pas de virus. Il est de votre responsabilité de vous en assurer avant de
les ouvrir. ------------------------------------------------------------------------------------------ This message and all attachments are confidential and
intended solely for the recipients. Any unauthorized use or dissemination is prohibited. E-mail is susceptible to tampering. We decline all responsability for the message if
tampered, changed or falsified. We believe, but do not warrant, that this message and
all attachments are virus free. You should take full responsability for virus
checking. -- |
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
