2017-02-19 45 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