
TextField.selectable Property
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
866
|
ActionScript Language Reference
See Also
TextField.bottomScroll, TextField.hscroll, TextField.maxhscroll, TextField.scroll; the
FScrollBar component in Appendix G
TextField.selectable Property
Boolean; enables or disables selection by the user
Flash 6
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 ...