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

ContextMenu of the table menu button should be accessible

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • javafx

      The context menu of the table menu in a TableView is pretty much useless. Currently you have to click the button for each and every column that you wish to show or hide because the menu closes after the click. Now imagine you have 10 columns and you wish to hide 8 of them. The menu must stay open, CustomMenuItem provides that feature. Moreover you can't extend the menu, e. g. with a "show all" and "hide all" menu item or with a custom menu item that selects various columns depending on predefined categories.

      The easiest solution would be to provide a getter for the ContextMenu of the TableHeaderRow since it's already available in the TableHeaderRow class.

      One problem arises however, but that's already existing in the current implementation: When you hide all of the columns, the header row and with it the column menu disappears. So you can't make any columns visible again. But since the TableHeaderRow class is a StackPane you could work around that problem by simply specifying the preferred height of the TableHeaderRow for now.

            Unassigned Unassigned
            duke J. Duke
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Imported: