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

Disabling menus does not disable submenus.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 8
    • Fix Version/s: 9
    • Component/s: javafx
    • Environment:

      Windows 8, JavaFX 8 b64

      Description

      If I make a structure of MenuItems and nested Menus in a MenuBar, setting the disable property doesn't work the way I'd expect it to in cases where the menu "popup" is visible when the disable property changes.

      In particular, if I set "disable" to true on a Menu, I would expect that all of its children are disabled, too. Similarly, if any of those children are themselves Menus, then their children in turn should be disabled. More grandly, if I set "disable" to true on a MenuBar, every single Menu/MenuItem in that MenuBar should be disabled.

      Unfortunately, if you have a Menu open (i.e. popped up) when it's "disable" property changes, you can see that this is not happening. The Menu itself immediately becomes disabled, but the MenuItems in the popup remain enabled and ready to go.

      ------------

      A good template for a solution already exists in the Node class, which has TWO properties ("disable" and "disabled") which I believe are there to allow for exactly this kind of "inherited" disabledness between parent and children Nodes.

        Attachments

          Activity

            People

            • Assignee:
              jgiles Jonathan Giles
              Reporter:
              cbanackjfx Cory Banack (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: