Skip to main content
Participant
September 25, 2009
Question

How to target to TextField in text layout Framework?

  • September 25, 2009
  • 1 reply
  • 841 views

how can i find text field X position,Y position,width and height? and All the text field properties?

This topic has been closed for replies.

1 reply

Participating Frequently
September 25, 2009

See the example below, hope this is what you're looking for.

var

tf:TextField = new TextField();

tf.text = "AAAA";

var x:Number = tf.x;

var y:Number = tf.y;

var h:Number = tf.height;

var w:Number = tf.width;

Known Participant
October 14, 2009

If your actually looking for the textfield object itself, I don't believe you are going to be able to find it.  I have been doing some investigation into this as I'm working on custom context menu's and the root of the issue comes down to the fact that a textflow is not a display object and not part of the display object tree, thus you won't find something akin to the old textfield displayobject, however, the individual textlines themselves are display objects, so you might be able to either look into those directly, or just work against the container object of the text lines, that should work as well.   Hope this helps!

~ JT