Table of Contents

TextField.selectable Property Flash 6

Boolean; enables or disables selection by the user read/write
theField.selectable

Description

The Boolean selectable property governs whether the characters in theField can be selected by the user. By default, all text fields can be selected (selectable is true). To create a nonselectable text field for display only, set its selectable property to false:

this.createTextField("output_txt", 1, 0, 0, 200, 20);
output_txt.selectable = false;
output_txt.text = "This is output only.";

To create a text field that can receive user input, set its type property to "input" and ensure that selectable is true:

this.createTextField("input_txt", 1, 0, 0, 200, 20);
input_txt.selectable = true;
input_txt.border = true;
input_txt.type = "input";
input_txt.text = "This field can accept input.";

When selectable is false, a field cannot receive user input, nor can it be focused by the user. However, a text field can always be focused and selected programmatically with the Selection object, regardless of the value of its selectable property.

See Also

The Selection object, TextField.maxChars, TextField.onKillFocus( ), TextField.onSetFocus( ), TextField.restrict, TextField.type


Table of Contents