Skip to main content
Jul 28, 2009 10:09 PM UTC
Question

TextArea.textFlow.flowComposer.findLineAtPosition() returns null?

I'm trying to draw buttons next to link elements in the textflow. I'm using TextArea.textFlow.flowComposer.findLineAtPosition() to get a TextFlowLine so I can find out the y position of the line so that I can draw the button next to the line. My problem is that the first time the function is called that draws the buttons, every TextFlowLine I get from the TextFlow is null. The TextFlow doesn't give me non-null TextFlowLines until after I mouse over the Text area.

Is there a function or something I can call to make sure that the TextFlow is ready to go before my other function gets called?

Thanks.

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Jul 30, 2009 3:14 PM UTC

Ok, I solved my own problem. I just added a creation complete listener to the entire component and when that fired I called my function for drawing the buttons and checking the textflowlines on the textflow.

Translate