4

I would like to simply have the text inside a Button to fill more of the Button or increase the font size in a button without increasing its size.

I tried using negative padding but it does not give the desired result.

DVarga
21.9k6 gold badges57 silver badges60 bronze badges
asked Oct 5, 2017 at 10:16

1 Answer 1

4

You can simply remove the padding using the -fx-padding property:

.button {
 -fx-padding: 0;
 -fx-font-size: 20;
}

enter image description here

answered Oct 5, 2017 at 10:33
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.