Unable to calculate text snippet height
Hello,
I am trying to dinamically adjust the size (height) of a container so a text snippet doesn't move to the next container. In other words I try to make sure that this exact snippet belongs to only one container. The way I try to achieve it is by listening to events which may influence the amount of text which fits the container. For example 'resize' event for the wrapping Sprite (or rather its parent) or 'INLINE_GRAPHIC_STATUS_CHANGED' event for the text flow because images can decrease the space for text. Whenever such events happen I check if the snippet belongs to more than one container and if not I increase the container's height (setting the composition height accordingly as well) and then I call 'compose()'. My expectation is that immediately after calling compose() I would be able to iterate over all TextFlowLines and retrieve the corresponding TextLines out of them. I also expect that all these will be valid and properly positioned/measured because I just called compose(). However some TextFlowLines are not completely populated with all these data. For example textLineExist=false, controller=null and validity='invalid'. This stops me from calculating the exact container's height I need to fit the snippet within this container.
Any information how to achieve this behavior would be greatly appreciated.
Thank you!
