在分页的情况下,如何增加页码按钮之间的间距?
In case of Pagination, how can I increase spacing between the page number buttons?
目前页码按钮显示如下:
我尝试使用:
pagination.setStyle("-fx-padding: 10 10 10 10;");
pagination.setStyle("-fx-spacing: 10;");
pagination.setStyle("-fx-background-insets: 5.0 5.0 5.0 5.0");
但都没有用。
我在网站上搜索了相同的问题,但没有找到任何解决方案。请提出解决方案。提前谢谢你。
您需要在分页控件中为 HBox
添加间距。 HBox 的 class 名称是 control-box
。添加-fx-spacing
。
.pagination .control-box {
-fx-spacing: 10;
}
目前页码按钮显示如下:
我尝试使用:
pagination.setStyle("-fx-padding: 10 10 10 10;");
pagination.setStyle("-fx-spacing: 10;");
pagination.setStyle("-fx-background-insets: 5.0 5.0 5.0 5.0");
但都没有用。
我在网站上搜索了相同的问题,但没有找到任何解决方案。请提出解决方案。提前谢谢你。
您需要在分页控件中为 HBox
添加间距。 HBox 的 class 名称是 control-box
。添加-fx-spacing
。
.pagination .control-box {
-fx-spacing: 10;
}