The code that I currently have is:
<HBox fx:id="mainTagBody" id="mainTagBodyInOverview" alignment="CENTER" xmlns="http://javafx.com/javafx"
stylesheets="@/client/stylesheets/Global.css"
xmlns:fx="http://javafx.com/fxml"
fx:controller="client.scenes.TagInOverviewCtrl">
<HBox fx:id="tagContain" HBox.hgrow="ALWAYS">
<Text fx:id="tagText" text="test" wrappingWidth="${tagContain.prefWidth}" />
</HBox>
<Button text="edit"/>
<Button text="delete"/>
</HBox>
and this is how it looks:
No matter what I tried to do, the text would just either go through the edge, like this:
and goes to the abyss, or like here:
extends the whole thing, moving the edge who knows where. I tried using the wrappingWidth in different ways, but none worked.
The way I intended for it to work is for the text to wrap when the tagContain hbox uses all available space, and avoid using exact numbers at all cost.