Making a smaller ComboBox

Mikael Grev grev at
Wed Jul 23 14:11:23 UTC 2014

Hello all!

(FYI this question has also been asked here without any correct answers: )

I'm trying to make a smaller version of the ComboBox but the gap between the text and the arrow button is constant no matter what I do.

If I use the css:

.combo-box-base > *.arrow-button {
    -fx-padding: 0 0 0 0;
    -fx-background-color: pink, pink, pink, pink;
the arrow button gets smaller but the ComboBox itself still have the same size, only increasing the gap between the arrow and text to compensate.

If I do

.combo-box > .list-cell {
    -fx-padding: 0 0 0 0;
    -fx-border-insets: 0 0 0 0;
The combo get a smaller height but the width remain fixed.

Is there any way to make the preferred size of the combo smaller by reducing the size between the text and arrow?

I have a screenshot of the ComboBox attached.


Mikael Grev

More information about the openjfx-dev mailing list