JavaFX隐藏滚动条

0

JavaFX通过CSS影藏滚动条代码

/* 垂直滚动条 */
/*
.main .table-view .virtual-flow .scroll-bar:vertical {
	-fx-pref-width:0;
}
*/
/* 水平滚动条 */
.main .table-view .virtual-flow .scroll-bar:horizontal {
	/* 关闭滚动条 */
	-fx-pref-height:0;
}
.main .table-view .virtual-flow .scroll-bar:horizontal .increment-button .increment-arrow {
	/* 影藏箭头 */
	-fx-background-color: transparent;
}
.main .table-view .virtual-flow .scroll-bar:horizontal .decrement-button .decrement-arrow {
	/* 影藏箭头 */
	-fx-background-color: transparent;
}

注意:垂直滚动条设置-fx-pref-width、水平滚动条设置-fx-pref-height