1

我制作Button的最大宽度为 300,并在其中输入了长文本。Button获得了最大尺寸,但是FlowPane最大尺寸也为 300 的 宽度增加了。文本如何Button影响FlowPane宽度?如何防止它发生?
截屏:

FlowPane标有黄色边框。

Button设置:

在此处输入图像描述

FlowPane设置:

在此处输入图像描述

4

1 回答 1

0

FlowPane里面放一个AnchorPane。将AnchorPane尺寸设置为FlowPane尺寸。至少,将 的左右AnchorPane约束设置FlowPane为 0。

在此处输入图像描述

这里真的FlowPane是你想要的Node吗?

于 2017-07-06T16:00:53.953 回答