Adrian Preuss
Adrian Preuss

Reputation: 3113

How to change the style of Menu entry

I have created a Menu on my JavaFX application. Here i want to style the RadioMenuItem component:

Sample

How i can:

Upvotes: 0

Views: 86

Answers (1)

DasMoeh
DasMoeh

Reputation: 411

You can use CSS styles.

Background color (checked):

.radio-menu-item:checked > .left-container {
    -fx-background-color: blue;
}

Arrow color:

.radio-menu-item:checked > .left-container > .radio {
    -fx-background-color: blue;
}

Same color hides the arrow.

Upvotes: 1

Related Questions