为什么我不能设置AnchorPane的可调整大小属性? [英] Why can't I set AnchorPane's resizable attribute?
问题描述
我使用JavaFX Scene Builder 1.1创建了一个FXML文件。默认情况下会创建一个AnchorPane。为什么我不能修改resizable属性?
为什么你不能编辑边界
I created a FXML file using JavaFX Scene Builder 1.1. An AnchorPane is created by default. Why can't I modify the resizable attribute?
Why you can't edit bounds
Checkout the javadoc on layoutBounds and boundsInLocal. You will notice that both are ReadOnlyObjectProperties, which is why you can't directly modify them in SceneBuilder.
How to resize a node in SceneBuilder
You can indirectly effect the bounds properties and directly set the resizable properties of the node by altering the min, pref and max height and width.
You can also set the pref size by selecting the pane to be resized and dragging the resizing anchors the surround the selected pane.
Further Information
You might want to read the Oracle tutorial on Tips for Sizing Nodes and Amy Fowler's presentation on JavaFX layout.
这篇关于为什么我不能设置AnchorPane的可调整大小属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!