How to assign shortcut to a button in fxml

I wanted to assign a button in fxml a keyboard shortcut. below is the example how to do that.

<Button mnemonicParsing="true" text="_Click Me">

Enter fullscreen mode Exit fullscreen mode

Now that button will have underscore on that “C” and user can call it automatically with key combination of ALT+C, The form that button should have the focus.
Example: https://github.com/ozkanpakdil/swaggerific/blob/main/src/main/resources/com/mascix/swaggerific/tab-request.fxml#L29

原文链接:How to assign shortcut to a button in fxml

© 版权声明
THE END
喜欢就支持一下吧
点赞11 分享
If you never chase your dream, you will never catch them.
若不去追逐梦想,你将永远无法抓住梦想
评论 抢沙发

请登录后发表评论

    暂无评论内容