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

Disabling menus does not disable submenus.


    • 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


      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.




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


              • Created: