Shape size expands with text content

Hi,

Is it possible to automatically expand the height of a shape depending on the size of its content?

For example, I am creating a Rounded Rectangle that has a child text box. The text box is populated with bullet points which can vary in number depending on certain factors within the code. Meaning that we will never know the number of points the text box will contain prior to generation. It may be 1 or could be up to 20.

Therefore I’m trying to see if its possible for the rounded rectangle to expand with the size of the text box?

Thanks

Hi

Thanks for your inquiry. Have you tried using FitShapeToText property?
https://reference.aspose.com/words/java/com.aspose.words/textbox/#getFitShapeToText
Hope this helps.
Best regards.