1

プロジェクトでjfxtrasライブラリのCalendarTextFieldを使用し、cssを適用し、fxmlでprefHeightとprefWidthを設定していますが、高さはフィールドのアイコンにのみ適用され、フィールドの高さはフォントサイズで調整されます。

FXML

<CalendarTextField fx:id="startDateField" prefWidth="230" prefHeight="32.0"/>

CSS

.CalendarTextField {
-fx-text-fill : #f00;
-fx-font-size: 24;
}

.CalendarTextField .icon{
-fx-image: url("../images/calender.png");
-fx-cursor:hand;
}
4

0 に答える 0