SetTextDirection
Forms, interaction, Unicode
Description
Sets the base paragraph direction used by the form session's visual caret navigation
The setting remains active across edits in the same session and invalidates any cached visual caret order when it changes
ftdAuto resolves from the first strong character of the current edit value, while explicit directions remain stable when the value changes
Field values remain in logical UTF-16 order and the method does not write a private PDF key or reinterpret the field's /Q alignment
Declaration
function SetTextDirection(
Direction: TPDFlibFormTextDirection): Integer;
Parameters
| Direction | ftdAuto, ftdLeftToRight or ftdRightToLeft |
|---|
Return value
Returns 1 when the direction is accepted, otherwise 0 for an invalid enumeration or a reentrant edit operation
Example
Session.SetTextDirection(ftdRightToLeft);
if Session.BeginEdit(FieldIndex) = 1 then
Session.MoveVisualCaret(False);
See also
TPDFlibFormTextDirection, MoveVisualCaret, GetVisualCaretOrder, TPDFlibFormSession