ComboBox

时间:2018-04-06 01:19:43

标签: java javafx javafx-8

我对使用JavaFx创建的组合框感到担忧,这是通过触摸屏为触摸应用程序处理的,在这个组合框中,滚动条并不总是可见,并且无法下载或移动信息在尝试从CSS和我没有成功。是否可以从代码中执行此操作或者您建议我使用它做什么?这是我用来尝试使ComboBox部署时始终可见的代码

 .combo-box-popup .list-view .scroll-bar:vertical .thumb
{
    -fx-max-width: 12px;
    -fx-background-color: black;
    -fx-background-insets: 2, 0, 0;
    -fx-background-size: 20px,40px;
    -fx-background-position: center 5% , center 95%;
}

.combo-box-popup .list-view .scroll-bar .thumb:hover,
.combo-box-popup .list-view .scroll-bar .thumb:pressed{
    -fx-background-color: derive(black,90%);
    -fx-min-width: 12px;
}

.combo-box-popup .list-view .scroll-bar:horizontal .thumb,
.combo-box-popup .list-view .scroll-bar:vertical .thumb {
    -fx-background-color:derive(black,90%);
    -fx-min-width: 12px;
    -fx-background-insets: 0, 0, 0;
    -fx-background-radius: 0em;
    visibility: visible;
}

0 个答案:

没有答案
相关问题