
August 22nd, 2003, 08:56 AM
|
|
Registered User
|
|
Join Date: Jan 2003
Location: Bath
Posts: 26
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
textfield cursor question
hey,
i have a problem with positioning text within a textfield and i'm not sure of the solution.
i have a text field which, when a button is clicked, inserts some text into the textfield. i am currently doing this using the method:
mytextfield.text += "this button was clicked";
obviously, this is only going to add the new text to the end of the text string in the box. what i need it to do is when the button is clicked, add text to the position where the cursor was blinking before i moved the focus onto the button.
i can do this if i can get the position of the blinking cursor when the focus is killed (onKillFocos()). what i really need to know is how i can get the position within the text string...maybe as an attribute of the string.length.
any thoughts or suggestions would be welcomed.
thanks! 
Last edited by 1ain : August 22nd, 2003 at 08:58 AM.
|