日期选择器弹出窗口

时间:2017-10-10 06:09:00

标签: css intellij-idea javafx scenebuilder

我需要在Java FX中使用CSS类的帮助来设置日期选择器模块的样式。

特别是弹出窗口,我还使用了风景视图来查找CSS代码。但是在弹出窗口中不起作用。我需要一个帮助如何在日历视图中设置样式。

(使用intelijIdea)

这是我的代码和附图。

enter image description here

.date-picker .combo-box {
-fx-background-insets:0px ;
-fx-border-width: 0px;
  }

.date-picker .text-field{
-fx-background-radius:0px ;
-fx-border-color: transparent;
}

.date-picker .arrow-button{
-fx-background-radius:0px ;
-fx-background-color: #232323;
}

.date-picker .arrow-button .arrow{
-fx-background-radius:0px ;
-fx-background-color: #1783CC;
}

.date-picker .arrow-button:hover .arrow{
-fx-background-radius:0px ;
-fx-background-color: #40a9ef;
 }

 .date-picker .button {
-fx-background-color: transparent;
-fx-border-color:transparent;
-fx-pref-height: 35px;
-fx-pref-width: 35px;
 }

 .date-picker .button:hover {
-fx-border-color:transparent;
-fx-pref-height: 35px;
-fx-pref-width: 35px;
 }

.date-picker .button .arrow:pressed {
-fx-border-color:transparent;
-fx-pref-height: 35px;
-fx-pref-width: 35px;
 }

 .date-picker .cell {
-fx-background-color: #232323;
-fx-pref-width:20px ;
-fx-pref-height:25px ;
 }

.date-picker .cell:hover {
-fx-background-color: #1783CC;
-fx-pref-width:20px ;
-fx-pref-height:25px ;
}

.date-picker .cell:focused {
-fx-background-color:#11659e;
-fx-pref-width:20px ;
-fx-pref-height:25px ;
 }

.date-picker-popup  {
-fx-border-color: #1783CC;
-fx-background-color: black;
 }

1 个答案:

答案 0 :(得分:0)

DatePicker弹出窗口的大多数样式类都可以在Unmute Breakpoints on Session Finish或其中一个JavaFX的主题样式表中找到。 例如,如果您正在使用模型主题,那么您将在modena.css(来自第2934行)中找到这些样式类

使用ScenicView时的快速解决方法是阻止弹出窗口关闭:

DatePickerContent.java
相关问题