views:

76

answers:

2

I have one textfield and I set it's position to for example x=5, y=5. So I have it like this:

1-2-3-4-5-6-7-8-9-x
2       
3
4
5       
6       TEXT
7
8
9
x

Is it possible to set the textField in a way that the x y value are applied to the bottom corner of the textField like this

1-2-3-4-5-6-7-8-9-x
2       
3
4    TEXT
5  
6
7
8
9
x

Hope I explained myself correctly.

Thank you in advance .

David

A: 

Other than just setting textfield.y = y - height, I don't think so.

David
+1  A: 

You'd need to extend TextField and override updateDisplayList() with the appropriate logic to calculate this for you. There is no way to explicitly set the origin on a display object.

Joel Hooks
And what if I set: this.autoSize = TextFieldAutoSize.CENTER ?
0plus1