Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8128396

ContextMenu from Menu outside DOM structure, No access to ContextMenu object created for Menu

    XMLWordPrintable

Details

    Description

      The ContextMenu created automaticly during adding MenuItem's to Menu is outside DOM structure, so there is no option to have more then one custom skin for ContextMenu, and there is no way to get programatically object representing ContectMenu (submenu of menu), and to set StyleClass or Id. I don't know if it is really a bug, or it supposed to work like that, but I don't think so.

      Example:
      //.java
      Menu menu1 = new Menu("File");
      menu1.setId("menu1");
      menu1.getItems().addAll(new MenuItem("Open"), new MenuItem("Close"), ...);

      //.css
      //Problem: No access to ContextMenu
      #menu1 .context-menu {}
      // only this works
      .context-menu {}

      Attachments

        Issue Links

          Activity

            People

              dgrieve David Grieve
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: