-
Dead space on Text Fields (how to remove)
Greetings all,
I'm having an issue whereby I need to stack lines of text on top of each other. Each line is a separate text field and can be scaled at different font sizes by a slider component. When text enlarges in size in the text field, it pushes lines below it down. That much I have working.
However, all the text fields I create seem to have dead vertical space. By that I mean there is a significant gap between the edge of the top and bottom of the text pixels and the border of the text field - and this space seems to scale depending on the font size of the text.
I would like to completely eliminate this dead space and have the borders of the text field come down to exactly the height of the text itself. Or at least figure out how to define how much dead space there will be when the text is at a certain size so I can shift the text boxes vertically by the right amount (effectively counteracting it in the actionscript) and make only a pixel or two of gap between each line.
Anyone know of a method or strategy I could try? (I'm using as3)
Cheers!
Mj
(ps. textHeight when I tested it seems to be reading neither the height of the text pixels nor the space between the borders. It was somewhere in between, which confuses me no end.)
-
Senior Member
maybe try a textFormat on the textFields and adjust the leading?
or maybe play with some CSS on it?
-
Thanks whispers.
Yeah i think CSS is my best bet. I can't seem to adjust leading with any effectiveness...
Now if I could figure out the ratio of the size of the text to the gap it creates and deduct it from the y position of the line below it, that might work. But it doesnt seem consistent haha
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|