Code Monkey home page Code Monkey logo

Comments (5)

0x4a616e avatar 0x4a616e commented on August 18, 2024

Hi! I think the reason is that custom menus are just not supported in combination with system menu bars https://github.com/openjdk/jfx/blob/c705bd493931d88650542be5466d6add359f45b9/modules/javafx.controls/src/main/java/javafx/scene/control/skin/MenuBarSkin.java#L881

On Windows, you probably don't use system menu bars (as AFAIK Windows doesn't support them at all), which is why it is working there. So I guess that this is less a NSMenuFX issue than a general JavaFX problem. NSMenuFX uses the system menu property of JavaFX to put menus into the macOS system menu bar.

from nsmenufx.

vewert avatar vewert commented on August 18, 2024

Hmmm, that is unfortunate. I was using CustomMenuItems so I could add tooltips to some of my menu items. Other than not using CustomMenuItems, do you know of any work-arounds for this?

from nsmenufx.

0x4a616e avatar 0x4a616e commented on August 18, 2024

Hmm, apparently macOS menu items do support tooltips: https://developer.apple.com/documentation/appkit/nsmenuitem/1514848-tooltip?language=objc
Unfortunately, I cannot think of any way to make this work with JavaFX. The only thing I can think of right now is to add some helper class that lets you add tooltips to menu items created by NSMenuFX.

from nsmenufx.

vewert avatar vewert commented on August 18, 2024

Thanks for looking into this. For now I will switch to use regular MenuItem, and then see if can figure out a way to get tooltips to work.

from nsmenufx.

Oliver-Loeffler avatar Oliver-Loeffler commented on August 18, 2024

Windows does not seem to support tool tips either in its standard menus. May QT does this but not necessarily the windows standard framework. Haven't seen any macOS apps with tooltips in menus. If macOS supports this, then this would require an enhancement request for OpenJFX.

from nsmenufx.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.