set_AltText method
The set_AltText method sets the primary character data or alternative character data that is associated with a field. You can use this method for multi-pass verification tasks and double-blind data entry tasks.
.NET restriction: For VBScript,
use the AltText property instead.
The set_AltText method
sets primary and alternative values that are stored in the page XML
file in ASCII format, as shown in the following example:F id="Vendor">
<V n="TYPE">Vendor</V>
<V n="Position">0,0,0,0</V>
<V n="STATUS">1</V>
<C cn="6,8,10" cr="0,0,0,0">83,49,68</C>
<C cn="6,8,10" cr="0,0,0,0">116,50,97</C>
<C cn="6,8,10" cr="0,0,0,0">105,51,116</C>
<C cn="6,8,10" cr="0,0,0,0">110,52,97</C>
</F>
In the sample XML file, the primary text value
for the fourth character is 110. The first alternative text value
is 52, and the second alternative text value is 97.Syntax
- C#
void set_AltText(int nIndex, string pVal)
Applies to
Field objects only.Arguments
- nIndex
- 0 specifies the primary value. Where the field contains multiple recognition, voting, or multi-pass data entry values, 1 specifies the first alternative, 2 specifies the second alternative, and so on.
- pVal
- String containing the alternative text.
C# example
This example sets the alternative value 1 in the field object.
m_oField.set_AltText(1, "Hello");
- Use the set_AltConfidenceString method to specify a confidence level other than the default value of 9 (high confidence).
- Use the Text property to set the primary field value.
- Use the set_CharValue method to set individual characters.