Except getTextExtent() is deprecated with no replacement since 8 O_o
Why is that?
- Andreas
Kalle Thyselius, inlovewith wrote:
i remember doing this a few years ago, using
— a loop (filling the textfield) and autoSize=true to determine if
there was a line break (you could determine this in other ways)
— and if _height > old_height in the loop, do
— letterCurrentY += LINE_HEIGHT
then use getTextExtent() to get _x.
i remember there was some margins and stuff inside the text field to
take into account, but it worked. the problem is it can be hard to
find out the constant LINE_HEIGHT.
good luck,
kalle
On 1/2/06, Michael Bedar <[EMAIL PROTECTED]> wrote:
To answer the original question - there is no direct way to do this,
although you can use the text-extent to get the x offset of the caret
fairly easily in a single line textfield.
On Jan 2, 2006, at 9:47 AM, Andreas Rønning wrote:
Is there a decent way of getting the _x / _y position of a caret in
a text box? Somehow compare the x/y of the textfield with the caret
index..?
Have a hard time getting an exact value from this.
- Andreas
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--
inlovewith.com
inlovewith ltd.
kalle thyselius
linnégatan 76, stockholm, sweden
+ 46 707 602 600
inlovewith you
------------------------------------------------------------------------
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders