I need to wrap changable text block to fit it into border. I bind text of my text block to be editable. It is string converted into text data. Text block has the auto wrap word option on and horizontal fill alignement. The problem is: when I change string, text wrap to fill old text size. It doesn’t fill border, but space which previous text was filling. It means that if the previous string was very small, after changing string it will try to fit into very small space, not a border. Am I doing something wrong? Is there a solution to my problem? Or is it bug?
Is Size set to Auto or Fill? (I think it needs to be set to Fill)
I think this is a limitation in slate in 4.4. I think we’ve fixed it in 4.5, you’ll be able to set the HAlign of Text to Fill, and then set the justification, that may do what you want. Alternatively, you can force a particular wrap size with WrapAt.
I made some mistakes in description, sry for that. I don’t want to fill border but button (but I tried with border and it behave identical). Button has its size set to “Fill” beacuse it needs to fill the Vertical Box. Setting it to “auto” doesn’t fix problem (in fact it is even worse because if there is a wide string after narrow one, text will be shown as a large column and it will “push” another elements below it). Text block inside button have its layout set to “Horizontaly Align Center”, because “Fill” will in fact anchor it to the left side of the button. Can it be filled and centered the same time?