标题: Editable Text (Text Behavior) [打印本页] 作者: Asen 时间: 2011-10-15 10:50 标题: Editable Text (Text Behavior)
Editable Text (Text Behavior)
Summary
Enables editing for a text object, when focused.
Category
Latest Behaviors
Author
Gavin Kistner
Difficulty
(Reference)
Time to Complete
5 Minutes
Downloads
Click Here
to download the associated files.
(This document covers version 2.0.5 of the 'Editable Text' behavior, current as of 2005-Apr-08)
Description
If
Start Editable?
is checked, the last object with this behavior will be focused and editable. (If not, the user has to click on the text object to start editing it.)
If
Max Characters
is greater than 0, the user will not be able to type more characters than the specified number. If
Single Line?
is checked, the user will not be able to add new lines.
Note that this behavior does not support copy, paste, selecting multiple characters, or using the mouse to move the insertion point.
This behavior uses the
Focusable
behavior to track which text object is selected; see that behavior for events which may fire on the parent object. Note that if you want to dynamically change the text in the text object, be sure to blur the text object (invoking the custom
.blur()
method on the text object, the
.blurParent()
method on this behavior, or the
Blur Parent
action on this behavior) before changing the contents of the text object.
Basic Properties
Start Editable?
Should this text object start out with focus?
Max Characters
Maximum number of characters to allow (0 for unlimited)