Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    MenuBar

    1. How can I create a menu bar?
    2. How can I use com.smartgwt.client.widgets.menu.MenuBar class?

    Thanks.

    #2
    Re: MenuBar

    Nobody here?

    I've used something like this:
    <code>
    MenuButton menuA = new MenuButton("A");
    ...

    HLayout layout = new HLayout();
    layout.addMember(menuA);
    layout.addMember(menuB);
    layout.addMember(menuC);
    layout.draw();
    </code>

    But I think that is not the right solution(I want that menuA to be closed when mouse over/click menuB). So: I'm back to my question:
    How can I use com.smartgwt.client.widgets.menu.MenuBar class ?
    Last edited by cazacugmihai; 25 Nov 2008, 03:53.

    Comment


      #3
      Please pick up the 11-24-2008 build. It has the method MenuBar.setMenus.

      You can then do something like :

      Code:
      Menu menu1 = new Menu();
      menu1.setTitle("File");
      menu1.setItems(new MenuItem("New"), new MenuItem("Open"));
      
      Menu menu2 = new Menu();
      menu2.setTitle("Search");
      menu2.setItems(new MenuItem("Find"), new MenuItem("Replace"));
      
      
      MenuBar menuBar = new MenuBar();
      menuBar.setMenus(menu1, menu2);
      
      menuBar.draw();
      Sanjiv

      Comment


        #4
        That's perfect. I will try it. Thanks.

        Comment


          #5
          It is possible to set autofit to false for a Menu/MenuBar?
          Now, my menuBar looks like:

          <code>
          |______Title1______|______Title2______|...|______TitleN______|
          </code>

          How can I obtain this look:

          <code>
          |_Title1_|_Title2_|...|_TitleN_|
          </code>

          Thanks again.
          Last edited by cazacugmihai; 25 Nov 2008, 06:38.

          Comment


            #6
            I have the same concern, does anyone have any advice?

            Comment


              #7
              Did u look are the sourcecode at: http://www.smartclient.com/smartgwt/...ory_appearance ?

              Comment


                #8
                menuBar Display

                Hi, since we are on the topic of menubar. I find that when I implement menubar it shows black grid lines in the menu items. Has anyone have this problem ? and if so does anyone knows why?

                Thanks,

                Comment


                  #9
                  You may be loading some CSS that does this - take a look at your .html file.

                  Comment


                    #10
                    Is there no solution for the given problem?
                    Right now I'm using version 2.4.

                    Thanks

                    Comment

                    Working...
                    X