Will
Will

Reputation: 3585

How can I stylize the text of a button or toggle button in JavaFX using CSS?

I'm not sure this is even possible. I've looked around on google a bit and found next to nothing on this subject. I like being able to stylize labels to make them look engraved or embossed in the CSS style sheet using the InnerShadow and DropShadow effects. I've tried the same on buttons but it doesn't effect the text, it just applies it directly to the button.

What would be the CSS I would need to use to apply the InnerShadow and/or DropShadow effects to the text of a button or toggle button?

Upvotes: 0

Views: 1228

Answers (2)

Uluk Biy
Uluk Biy

Reputation: 49185

Om further comments in the FXExperience: Styling FX Buttons with CSS page, it is mentioned that
the #ID Text has been changed to #ID LabeledText. I just confirmed that on JavaFX 8.

Upvotes: 3

JackReacher
JackReacher

Reputation: 1

I think the best way to do this is to add a label into your button and stylize your label

Upvotes: 0

Related Questions