PDA

View Full Version : vertical centering of dynamic text



rafnews
February 10th, 2008, 08:59 AM
Hi,

i have a dynamic text object with some text inside.
how can i center vertically the text ?

i found how to do it horizontally, but nothing is written for vertical positioning.

thx.

hoolagon
February 11th, 2008, 08:28 AM
Hi,

i have a dynamic text object with some text inside.
how can i center vertically the text ?

i found how to do it horizontally, but nothing is written for vertical positioning.

thx.

I just did this on friday.
if yourTextfield_txt.textHeight <= yourTextfield_txt.height then move the text field down by (yourTextfield_txt.height/2)-(yourTextfield_txt.textHeight/2) or something like that.
Worked for me anyway. It works as long as theres no images in the dynamic text field.
then you get this problem http://www.kirupa.com/forum/showthread.php?t=288498 which i have yet to solve