Announcement

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

    How can I use contexMenu on Column Tree

    addShowContextMenuHandler(new ShowContextMenuHandler() {
    @Override
    public void onShowContextMenu(ShowContextMenuEvent event) {
    setContextMenu(getMenuContext2());
    getContextMenu().showContextMenu();
    }
    });

    }


    public Menu getMenuContext2() {
    Menu menu = new Menu();
    menu.setShowShadow(true);
    menu.setShadowDepth(20);
    MenuItem del = new MenuItem("deneme");
    menu.addItem(del);
    return menu;
    }


    I use this. But When I use right click not seem contex menu....

    #2
    Try simplifying it, instead of addShowContextMenuHandler(), use this:

    Code:
    columnTree.setContextMenu(getMenuContext2());
    regards,
    Andrius J.

    Comment


      #3
      thank's for answer... It's work... but now when I use right click open contex menu and submenus at the same time... ı don't want open sub menus when I use right click...

      regards

      Comment


        #4
        Post a screenshot, not sure what's the problem there.

        regards,
        Andrius J.

        Comment


          #5
          when I use right click; open contex menu and sub menus....
          Attached Files

          Comment


            #6
            The menu does't seem to have any submenus? Or you just don't want to show the items in the next tree level when you right click a tree node?

            regards,
            Andrius J.

            Comment


              #7
              At the first time I have one column... the column contents 'iphone,adroid... etc.' you can see my printscreen... when I use right click open the contex menu and same time open a new column; that's contents ' 1.00, etc'... I want just open contex menu... Not open a new column when use right click...

              Comment

              Working...
              X