-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Stage puts App menu on it #19
Comments
For each MenuBar, it might be required to set the property Do the new Scenes and Stages also have their own menus? The FXML looks as follows: <?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1">
<children>
<MenuBar prefHeight="11.0" prefWidth="140.0" useSystemMenuBar="true">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Delete" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
</children>
</AnchorPane> In Java code its: MenuBar menuBar = new MenuBar();
menuBar.useSystemMenuBarProperty().setValue(true); |
@Oliver-Loeffler Sorry I didn't catch that you commented on here till today. To answer your question, NO, those other windows do not have any menu on them at all, and I don't use FXML ... I stopped using it years ago. So for example, the screenshot I showed you normally looks like this: But when I use your library, it throws a menu on every Scene for some reason. I only have one window with a menu and everything else is dialogue style only built manually with standard Scenes and Stages. |
Just started trying to implement this library into an app of mine, and I got it properly showing the menu at the top of the screen in MacOs, but when I create new scenes (with new stages) they get a copy of the menu placed on them as you can see in the attached screen shot.
How do I prevent this from happening?
The text was updated successfully, but these errors were encountered: