java如何更改ChoiceBox的默认大小? 1 年,2 月 Questions & Answers 699 我正在使用ChoiceBox,并将ChoiceBox放入HBox,HBox将进入窗格。但是,我注意到choiceBox的默认宽度很短。有人知道我如何改变它吗?(不更改下拉宽度,我想更改单击的位置)
# 1 楼答案 有些方法继承自类javafx。场景布局区域如果需要setMaxHeight、setMaxWidth、setMaxSize、setPrefHeight、setPrefWidth、setPrefSize,可以使用它们 资源:https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/ChoiceBox.html#valueProperty
# 1 楼答案
有些方法继承自类javafx。场景布局区域如果需要setMaxHeight、setMaxWidth、setMaxSize、setPrefHeight、setPrefWidth、setPrefSize,可以使用它们
资源:https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/ChoiceBox.html#valueProperty