AS3 disable editable/selectable for textInput inside of a Datagrid

不想你离开。 提交于 2019-12-05 08:10:38

The easiest approach is to change the TextField type itself and then change it's selectable property:

//disable input
tf.selectable = false;
tf.type = TextFieldType.DYNAMIC;

//enable input
tf.selectable = true;
tf.type = TextFieldType.INPUT;

Also don't forget to set the mouseEnabled & tabEnabled properties as appropriate/needed for your fields.

Be sure to import the TextFieldType at the top of your class / page / frame as:

import flash.text.TextFieldType;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!