I would like to have a Flowpane layout of items irrespective of the size of the parent of the Flowpane
From what I understand, calling setManaged(false) on any region should cause the parent to not size the region and cause the region to become its own layout root.
However if I attempt this with
Pane
-FlowPane
-label
-label
-label
where the flowpane has managed set to false and min/max/pref width and height all set to absolute values, In my example 200 pixels, then I would expect to see the Pane have its set size and the FlowPane to be sitting wherever i place it with a height and width of 200. This is not the case.
here is a barebones example. While the labels render outside of their parent flowpane, the flowpane computes a width and height of 0, so the wrapping logic for a wider flowpane will never allow anything less than wrapping every item like a stackPane.
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.FlowPane?>
<?import javafx.scene.layout.Pane?>
<Pane prefHeight="500.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/19" xmlns:fx="http://javafx.com/fxml/1">
<children>
<FlowPane alignment="CENTER_LEFT" managed="false" maxHeight="200.0" maxWidth="200.0" minHeight="200.0" minWidth="200.0" prefHeight="200.0" prefWidth="200.0" translateX="120.0" translateY="120.0">
<children>
<Label text="fdsfdfdsfdsfds">
<graphic>
<Pane maxHeight="10.0" maxWidth="10.0" minWidth="10.0" prefHeight="10.0" prefWidth="10.0" style="-fx-background-color: red;" />
</graphic>
</Label>
<Label text="dfdfdsfsdf">
<graphic>
<Pane maxHeight="10.0" maxWidth="10.0" minWidth="10.0" prefHeight="10.0" prefWidth="10.0" style="-fx-background-color: red;" />
</graphic>
</Label>
<Label text="dfdfsd">
<graphic>
<Pane maxHeight="10.0" maxWidth="10.0" minWidth="10.0" prefHeight="10.0" prefWidth="10.0" style="-fx-background-color: red;" />
</graphic>
</Label>
<Label text="fdsfds">
<graphic>
<Pane maxHeight="10.0" maxWidth="10.0" minWidth="10.0" prefHeight="10.0" prefWidth="10.0" style="-fx-background-color: red;" />
</graphic>
</Label>
</children>
</FlowPane>
</children>
</Pane>
What could explain this lack of a local size?