R – Cursor disappears when TextField.selectable = false;

actionscript-3flex3

Cursor disappears when

TextField.selectable = false;

How can I make cursor to be visible but textfield not selectable(with mouse) or CTRL+A.

Best Answer

I've seen a similar problem in the past, but I don't remember how to duplicate it. It no longer appears in the project I first saw it in, so the two things which I know have happened since then are below. Of course, there could be some other variable, but the project is working now...

I suspect that the field is still editable. That would be my first guess. The first thing I would try then:

//( in a flash.text object ( Flash or Flex ) )
myTxtFld.type = TextFieldType.DYNAMIC;

//( in a mx.controls object ( Flex ) )
myTxtFld.editable = false;

If that does not work, try nesting the TextField in something with a MouseEvent.ROLL_OVER listener and useHandCursor set to False. eg:

var spt:Sprite = new Sprite();
spt.useHandCursor = false;
spt.addChild( myTxtFld );
spt.addEventListener( MouseEvent.ROLL_OVER, function( anon:* ){} );
Related Topic