FMX.Edit.TCustomEdit.CaretPosition
Delphi
property CaretPosition: Integer read GetCaretPosition write SetCaretPosition;
C++
__property int CaretPosition = {read=GetCaretPosition, write=SetCaretPosition, nodefault};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | FMX.Edit.pas FMX.Edit.hpp |
FMX.Edit | TCustomEdit |
Description
Provides access to the caret position in this edit control.
Use CaretPosition to determine the position of the cursor in the edit control.
CaretPosition indicates the horizontal character coordinate of the cursor, indexed from zero.
Modify the value of the CaretPosition property to change the position of the cursor within the edit control. For the cursor to be visible, the edit control must have focus.
For example, if CaretPosition is set to 4, then the cursor is at the fifth character. If the length of text in the edit control is shorter than 5, the cursor moves to the end of the string.