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

TabPaneSkin: add 'menuGraphicFactory' property

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      It would be great if TabPane had an additional 'menuItemFactory' property for the menu items displayed in the drop-down when not all tabs can be displayed. Currently it's not possible to have custom graphics in this dropdown, and if one is set on the Tab itself which is not either a ImageView or Label it will not be visible. Looking at the code here there is currently only a hacky fix which just clones the graphics used. Having a property similar to the various cellFactory properties in ListView, TableView etc. would allow much greater customization.

      See also

      https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053306.html
      https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053338.html

        1. Screenshot 2025-04-03 at 08.18.17.png
          144 kB
          Andy Goryachev
        2. Submitter_Screenshot.png
          45 kB
          Anupam Dev
        3. TabPaneGraphicFactoryExample.java
          2 kB
          Andy Goryachev
        4. Test.java
          1 kB
          Anupam Dev

            angorya Andy Goryachev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: