简体   繁体   English

如何在JavaFX中将模态对话附加到主窗口?

[英]How to Attach Modal Dialogue to Main Window in JavaFX?

Examples of Attached Modal Dialogues: 附加模态对话的示例:

另一个例子

另一个例子

最后的例子

Is there any way to bring this to JavaFX? 有没有办法把它带到JavaFX?

Couldn't find support for attached dialogs out of the JavaFX box... So, how I would do it... 无法从JavaFX框中找到对附加对话框的支持......那么,我将如何做...

  • The dialog part: there's this, no way I'm beating it example gist 对话部分:有这个, 没有办法,我击败它例如要点

  • And a tweak to the CSS file - the .modal-dialog styleClass: 并调整CSS文件 - .modal-dialog styleClass:

    • -fx-position: fixed
    • -fx-top: 0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM