gpt4 book ai didi

treeview - 删除 JavaFX TreeView 滚动 Pane

转载 作者:行者123 更新时间:2023-12-03 17:18:40 31 4
gpt4 key购买 nike

我需要在较大的滚动 Pane 中使用 JavaFX 2.2 TreeView 控件,该滚动 Pane 具有多个不属于 Treeview 的其他元素。问题是 TreeView 有它自己的内置滚动 Pane 。有没有人有关闭内置滚动 Pane 的方法示例,以便 TreeView 与其中包含的项目一样大?

最佳答案

虽然目前无法移除滚动条,但可以使用 CSS 隐藏它们。

.your-selector *.column-header-background *.show-hide-columns-button,
.your-selector *.scroll-bar:vertical *.increment-button,
.your-selector *.scroll-bar:vertical *.decrement-button,
.your-selector *.scroll-bar:vertical *.increment-arrow,
.your-selector *.scroll-bar:vertical *.decrement-arrow {
-fx-background-color: null;
-fx-background-radius: 0;
-fx-background-insets: 0;
-fx-padding: 0;
-fx-shape: null;
}

.your-selector *.scroll-bar:horizontal,
.your-selector *.scroll-bar:horizontal *.track,
.your-selector *.scroll-bar:horizontal *.track-background,
.your-selector *.scroll-bar:horizontal *.thumb,
.your-selector *.scroll-bar:horizontal *.increment-button,
.your-selector *.scroll-bar:horizontal *.decrement-button,
.your-selector *.scroll-bar:horizontal *.increment-arrow,
.your-selector *.scroll-bar:horizontal *.decrement-arrow {
-fx-base: transparent;
-fx-background-color: white;
}

关于treeview - 删除 JavaFX TreeView 滚动 Pane ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23348120/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com