InputField Method

[Top]  [Chapter]  [Previous]  [Next]

Applies to

IWPTextCursor

Declaration

int InputField(string Name, string Text, bool CursorWithin)

Description

To insert a field use is method. It expects the name of the field and the initial text. The boolean parameter controls if the cursor should be placed inside (true) or after the new field (false). Using the true you can insert multiple paragraphs or an image inside of the field.

 

Parameters

Name

The name of the field

Text

The embedded text - this is initially displayed.

CursorWithin

"True" to place the cursor within the field markers (to add more text or an image), otherwise use "false".

Example:

IWPTextCursor TextCursor;

TextCursor = wpdllint1.Memo.TextCursor;

TextCursor.InputField("NAME","This is the name field",false);

 

After you inserted a field you can manipulate the created fieldmarkes using the interface CurrObj. For example you can use Memo.CurrObj.Mode = 2 to convert this field into an "edit field". Such fields mark the only editable text when the editor is in "FormCompletion" Mode.

Please also see Category Mailmerge and the "mail merge API introduction".

To delete, read or write data from a field use: Memo.TextCommandStr ID 43: Delete a field,
to move to a field use IWPTextCursor.MoveToField.

 


[idh_iwptextcursor_inputfield.htm]    Copyright © 2007 by WPCubed GmbH