[flexcoders] Padding/spacing before the first line in a TextArea

2008-12-02 Thread bjorn
There is some padding before the first line in a TextArea. Have a look at
this image to see what I mean:

http://i34.tinypic.com/4uz8s0.jpg

I need to remove this, and the first solution that comes to mind is to find
that value and position the TextArea.y = TextArea.y - [that value]. The
padding before the first line seems to be equal (in most cases) to the
font's descent, which I can get from getTextLineMetrics().descent.

However, this is not true in all cases. In some cases, the padding is more.

Anyone have suggestions?

Bjørn
-- 

http://www.juicability.com - flex blog
http://www.nospoiler.com - link to youtube videos without the spoilers


RE: [flexcoders] Padding/spacing before the first line in a TextArea

2008-12-02 Thread Alex Harui
Are you talking about the white pixels top and right of the selection 
rectangle?  I think that's always 2 pixels.  You might be able to alter the 
position of the TextArea's internal TextField to get rid of that.

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bjorn
Sent: Tuesday, December 02, 2008 8:09 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Padding/spacing before the first line in a TextArea

There is some padding before the first line in a TextArea. Have a look at this 
image to see what I mean:

http://i34.tinypic.com/4uz8s0.jpg

I need to remove this, and the first solution that comes to mind is to find 
that value and position the TextArea.y = TextArea.y - [that value]. The padding 
before the first line seems to be equal (in most cases) to the font's descent, 
which I can get from getTextLineMetrics().descent.

However, this is not true in all cases. In some cases, the padding is more.

Anyone have suggestions?

Bjørn
--

http://www.juicability.com - flex blog
http://www.nospoiler.com - link to youtube videos without the spoilers