2017-02-19 49 views

回答

1

在你的CSS文件中更改此属性(由modena.css):

.date-picker > .text-field { 
    -fx-background-color: 
     linear-gradient(to bottom, derive(-fx-text-box-border, -10%), -fx-text-box-border), 
     linear-gradient(from 0px 0px to 0px 5px, derive(-fx-control-inner-background, -9%), -fx-control-inner-background); 
    -fx-background-insets: 1 0 1 1; 
    -fx-background-radius: 2 0 0 2; 
} 

.date-picker:focused > .text-field, 
.date-picker > .text-field:focused { 
    -fx-background-color: 
     -fx-control-inner-background, 
     -fx-faint-focus-color, 
     linear-gradient(from 0px 0px to 0px 5px, derive(-fx-control-inner-background, -9%), -fx-control-inner-background); 
    -fx-background-insets: 1 0 1 1, 1 0 1 1, 3 2 3 3; 
    -fx-background-radius: 2 0 0 2, 1 0 0 1, 0; 
} 

很好的参考:JavaFX CSS Reference Guide

+0

真棒!这正是我正在寻找的!非常感谢! – Chiggiddi

+0

有没有一种方法来设计日期选择器的按钮? – deviant