techincally javafx help but same thing
I've got some java scenebuilder stuff styled with css
particularly a MenuBar
there are two Menus on the menu bar
each Menu contains another Menu with a Menu Item
Here is a screenshot of the problem

The hover property is working as well as the focused for the menu items selected but the menu on the main bar turns back to default blue when i leave so the focus property isnt working on it
i've tried quite a few things including (using .menu .menu-item and #MasterMenu285 with :selected :focused and :hover) and i'm about out of ideas
i want to get the -fx-background-color:#e1dbc4
CSS
Code
#MasterMenuBar{
-fx-background-color: #e1dbc4;
-fx-text-fill: #4a4b43;
}
.menu:hover{
-fx-background-color: #878658;
}
.menu-item:focused{
-fx-background-color: #878658;
}
FXML
Code
<?import javafx.scene.text.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<BorderPane fx:id="MasterBorderPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" stylesheets="@MasterWindowStyle.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.MasterController">
<top>
<VBox fx:id="MasterTitleVBox" BorderPane.alignment="CENTER">
<children>
<Label fx:id="MasterLabel" text="Master">
<font>
<Font name="Gabriola" size="36.0" />
</font>
<padding>
<Insets left="20.0" />
</padding>
</Label>
<Label id="ProjectChoiceLabel" fx:id="MasterProjectChoiceLabel" text="Chose A Project">
<font>
<Font name="Gabriola" size="18.0" />
</font>
<padding>
<Insets left="50.0" />
</padding>
</Label>
<MenuBar fx:id="MasterMenuBar">
<menus>
<Menu fx:id="MasterMenu285" mnemonicParsing="false" text="CSC285">
<items>
<Menu fx:id="HomeworkMenu285" mnemonicParsing="false" text="Homework">
<items>
<MenuItem id="HomeworkMenu1" fx:id="HomeworkMenu285Item1" mnemonicParsing="false" onAction="#Homework01Click" text="Homework_01" />
</items>
</Menu>
</items>
</Menu>
<Menu fx:id="MasterMenu406" mnemonicParsing="false" text="CSC406">
<items>
<Menu fx:id="ThreadPracticeMenu406" mnemonicParsing="false" text="Thread Practice">
<items>
<MenuItem id="ThreadPracticeMenu01" fx:id="ThreadPractice406Item1" mnemonicParsing="false" text="ThreadPractice_01" />
</items>
</Menu>
</items>
</Menu>
</menus>
</MenuBar>
</children>
</VBox>
</top>
<center>
<StackPane id="MasterContentPane" fx:id="MasterContentPane" BorderPane.alignment="CENTER">
<BorderPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</BorderPane.margin></StackPane>
</center>
</BorderPane>
edit: damn... some day i'll figure out how to get capital letters in a row too
This post was edited by Ideophobe on Sep 4 2016 05:09pm