Function TWPCustomRtfEdit.MoveToField(FieldName:string; from_start:Boolean) : Boolean
Unit: WPCTRMemo
Class: WPCTRMemo.TWPCustomRtfEdit
Parameters
-
FieldName:string from_start:Boolean
Returns
The type of the result value is Boolean.
Description
Moves the cursor to a certain field. You can use this code to move to the next field with a given name. This works prefectly when we are in form fill mode, too. To enter the form filling mode set the property : ProtectedProp := [ppAllExceptForEditFields].
// If this is the current, move on ...
if DataEdit.CurrentEditField=fieldname then
DataEdit.MoveToNextField(false);
// Try from here
if DataEdit.MoveToField(fieldname,false) then
DataEdit.SelectFieldAtCP(false, true)
// or from start
else if DataEdit.MoveToField(fieldname,true) then
DataEdit.SelectFieldAtCP(false, true);
DataEdit.SetFocus;
Also see