Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我制作Button的最大宽度为 300,并在其中输入了长文本。Button获得了最大尺寸,但是FlowPane最大尺寸也为 300 的 宽度增加了。文本如何Button影响FlowPane宽度?如何防止它发生? 截屏:
Button
FlowPane
FlowPane标有黄色边框。
Button设置:
FlowPane设置:
把FlowPane里面放一个AnchorPane。将AnchorPane尺寸设置为FlowPane尺寸。至少,将 的左右AnchorPane约束设置FlowPane为 0。
AnchorPane
这里真的FlowPane是你想要的Node吗?