I added the menus to the toolbar, the toolbar to the docklayout and the
docklayout to the window, and the window to the client document.

I don't get it!

Thank's for the tips about the document...

I appreciate your answers.

Kent

On Thu, 2005-11-17 at 10:19 +0100, Sebastian Werner wrote:
> Thanks Ken.
> 
> The problem is that you missed to add the menus to the top level widget 
> (client document is this case):
> 
> document.add(mailM, editM, viewM, actionsM, toolsM, searchM, helpM);
> 
> A small warning: It is a really bad idea to redefine the browsers 
> built-in "document" object with a local qooxdoo object.
> 
> Sebastian
> 
> 
> 
> Kent Olsson schrieb:
> > Here is an example:
> > 
> >       window.application.main = function() {
> >         var document = this.getClientWindow().getClientDocument();
> > 
> >         var mainF = new QxWindow("Testing...");
> >         mainF.setSpace(20, 400, 48, 250);
> >         document.add(mainF);
> > 
> >         var mainDL = new QxDockLayout;
> > 
> >         mainDL.setTop(0);
> >         mainDL.setLeft(0);
> >         mainDL.setRight(0);
> >         mainDL.setBottom(0);
> > 
> >         mainDL.setBorder(2, "outset");
> >         mainDL.setBackgroundColor("white");
> > 
> >         mainF.add(mainDL);
> > 
> > 
> >         var mailM    = new QxMenu;
> > 
> >         var newMB    = new QxMenuButton("New");
> >         var openMB   = new QxMenuButton("Open");
> >         var saveAsMB = new QxMenuButton("Save as..");
> >         var mailS    = new QxMenuSeparator();
> >         var closeMB  = new QxMenuButton("Close");
> >         var exitMB   = new QxMenuButton("Exit");
> > 
> >         mailM.add(newMB, openMB, saveAsMB, mailS, closeMB, exitMB);
> > 
> >         var editM    = new QxMenu();
> >         var viewM    = new QxMenu();
> >         var actionsM = new QxMenu();
> >         var toolsM   = new QxMenu();
> >         var searchM  = new QxMenu();
> >         var helpM    = new QxMenu();
> > 
> >         var menuTB = new QxToolBar();
> > 
> >         var mailTBMB    = new QxToolBarMenuButton("Mail",mailM);
> >         var editTBMB    = new QxToolBarMenuButton("Edit",editM);
> >         var viewTBMB    = new QxToolBarMenuButton("View",viewM);
> >         var actionsTBMB = new QxToolBarMenuButton("Actions",actionsM);
> >         var toolsTBMB   = new QxToolBarMenuButton("Tools",toolsM);
> >         var searchTBMB  = new QxToolBarMenuButton("Search", searchM);
> >         var helpTBMB    = new QxToolBarMenuButton("Help",helpM);
> > 
> >         menuTB.add(mailTBMB, editTBMB, viewTBMB, actionsTBMB, toolsTBMB,
> > searchTBMB, helpTBMB);
> > 
> >         mainDL.addTop(menuTB);
> > 
> >         var t2 = new QxContainer("Hello World");
> >         t2.setHeight(null);
> >         t2.setBackgroundColor("white");
> >         t2.setPadding(10);
> >         t2.setBorder(QxBorderObject.presets.inset);
> >         mainDL.addLeft(t2);
> > 
> > 
> > 
> >         mainF.open();
> >       };
> > 
> > 
> > I hope this helps.
> > 
> > Kent
> > 
> > On Thu, 2005-11-17 at 09:43 +0100, Sebastian Werner wrote:
> >> Kent Olsson schrieb:
> >>> I have added a QxWindow widget, with a QxDocLayout inside and with
> >>> several QxToolBarMenuButton:s to create a menu in the top by
> >>> doing .addTop()
> >>>
> >>> The window comes up. The docking layout comes up fine and resizes fine.
> >>> The menu is visible, but now QxMenu comes up by pressing a
> >>> QxToolBarMenuButton. I do not get any error message. It seems to me to
> >>> be a bug. Any other opinion?
> >> I have no idea. Please send an example for combinations like this to 
> >> help us to understand and play with it.
> >>
> >> Sebastian
> >>
> >>> Kent
> >>>
> >>>
> >>>
> >>> -------------------------------------------------------
> >>> This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> >>> Register for a JBoss Training Course.  Free Certification Exam
> >>> for All Training Attendees Through End of 2005. For more info visit:
> >>> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> >>> _______________________________________________
> >>> Qooxdoo-devel mailing list
> >>> [email protected]
> >>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> >>
> >>
> >> -------------------------------------------------------
> >> This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> >> Register for a JBoss Training Course.  Free Certification Exam
> >> for All Training Attendees Through End of 2005. For more info visit:
> >> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> >> _______________________________________________
> >> Qooxdoo-devel mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> > Register for a JBoss Training Course.  Free Certification Exam
> > for All Training Attendees Through End of 2005. For more info visit:
> > http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> > _______________________________________________
> > Qooxdoo-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> Register for a JBoss Training Course.  Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> _______________________________________________
> Qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to