我有一个带有SplitPane的JavaFX应用程序。我想隐藏SplitPane的滑动条/分割条。我该怎么做呢?
来自德国的问候(我的英语很抱歉)
朱利安
发布于 2014-07-25 23:40:36
这在Java ( FX8风格)中有一点不同:
.split-pane *.split-pane-divider {
-fx-padding: 0 1 0 1;
}发布于 2013-02-25 23:58:27
在caspian.css中,您将看到
/* horizontal the two nodes are placed to the left/right of each other. */
.split-pane:horizontal > * > .split-pane-divider {
-fx-border-color: transparent -fx-box-border transparent #BBBBBB;
-fx-background-color: transparent, -fx-inner-border-horizontal;
-fx-background-insets: 0, 0 1 0 1;
}
/* vertical the two nodes are placed on top of each other. */
.split-pane:vertical > * > .split-pane-divider {
-fx-border-color: #BBBBBB transparent -fx-box-border transparent;
-fx-background-color: transparent, -fx-inner-border;
-fx-background-insets: 0, 1 0 1 0;
}我使用的是垂直的,所以我在我的css中覆盖了垂直的,如下所示:
.split-pane:vertical > * > .split-pane-divider {
-fx-border-color: transparent;
-fx-background-color: transparent;
-fx-background-insets: 0;
}而且它是有效的。如果你也想隐藏抓取器(例如,我没有隐藏它,这看起来很好),我认为下面的规则可能会奏效:
.split-pane *.vertical-grabber {
-fx-padding: 0;
-fx-background-color: transparent;
-fx-background-insets: 0;
-fx-shape: " ";
}我希望它能帮上忙。
发布于 2015-10-13 13:35:06
这些其他答案仍然留下了一个细长的灰色条,所以在我的CSS中,我添加了:
.split-pane-divider {
-fx-background-color: transparent;
}https://stackoverflow.com/questions/12535397
复制相似问题