views:

236

answers:

3

How can I prevent mouse selecting (and moving caret) with Editable TextField(), this one does not seem to fully work when SELECTING text, but it prevents clicking. I want to keep cursor in place where its going.

protected function handleMouseDEvent(evt:MouseEvent):void {
if (evt.type == MouseEvent.MOUSE_DOWN) {
var max : int;
max = this.text.length;
this.setSelection(max, max) // SET CURSOR POSITION  
}
}
A: 

How about selectable="false"?

Assaf Lavie
not a preferred option, I like to show the cursor on screen
Tom
A: 

Have you tried programmatically switching the textfield from input to dynamic?

John Isaacks
I like to keep it editable "INPUT BOX"
Tom
How can it be editable but always have the cursor at the end of the text field?
Greg B
A: 

whenever the user has focus the textfield, put a transparent button on top of the text field , set the button to not using handCursor

and once the user is not focusing the text field, remove the transparent button

Unreality