SetDataAsText

Description

Formats data in a control as plain text.

Applies to

Signature controls

Syntax

Integer controlname.SetDataAsText ( data)

Argument

Description

controlname

The name of the control for which you want to set the data

data

The Unicode string containing the text data

Returns

Integer. Returns 1 for success and a negative integer for failure.

Usage

The SetDataAsText function can set only text data into a Signature control.

Examples

Example 1

The following example reads data in text format from a file into a Unicode string, then sets the data into a Signature control:

string ls_txt

integer li_file, li_rtn

li_file = FileOpen("\My Documents\tests.txt",  &
   StreamMode!, Read!)
FileRead( li_file, ls_txt )
FileClose( li_file )

li_rtn = sig_1.SetDataAsText(ls_txt)

See also