So I have this Spinner which is used for pagination. Its style class looks like below:
Spinner<Integer> spinner = new Spinner<>(1,20,1);
spinner.getStyleClass().add(Spinner.STYLE_CLASS_SPLIT_ARROWS_HORIZONTAL);
So now the spinner appears with arrows on the left and right sides of the number. However, the text is aligned to the left of the spinner always. Say even if I have some width for the spinner (ex. 200px or something) the number displayed in the spinner is always next to the left arrow. I would like to know how to set it to the center of the Spinner.
This is what I tried in CSS:
.spinner > .text-field
{
-fx-text-alignment: center;
}
.spinner
{
-fx-text-alignment: center;
}
.spinner > text
{
-fx-text-alignment: center;
}
Nothing worked.