heri0n
heri0n

Reputation: 1489

How to remove all padding from Label?

I am trying to remove all the padding from a Label contained in an HBox. I set paddingTop and paddingBottom to 0 in both the Label and HBox but there is still quite a bit of padding. I also tried setting verticalGap to 0 on HBox. If I just have a checkbox in the HBox the padding is removed fine.

Upvotes: 2

Views: 2211

Answers (3)

Alexander Volkov
Alexander Volkov

Reputation: 8372

May be there is a padding for the layout of the HBox?

Upvotes: 0

Oleg Cheremisin
Oleg Cheremisin

Reputation: 66

Question seems rather old, but recently I faced same problem and solution was replacing

<s:Label>
     some text
</s:Label>

(which gives about 190px of unwanted left padding) with

<s:Label text="some text" />

which works great!

Upvotes: 1

alxx
alxx

Reputation: 9897

Hint - padding can be negative.

Upvotes: 2

Related Questions