Sets the contents of a control from the data in a string. The text formatting in the string is maintained in the control.

Signature controls
Integer controlname.SetDataAsInk (data)
Argument |
Description |
|---|---|
controlname |
The name of the control for which you want to set the data |
data |
The blob or Unicode string containing the data |
Integer. Returns 1 for success and a negative integer for failure.
The SetDataAsRTF function can set only text data into a Signature control.
The following example reads data in RTF format from a file into a blob, then sets the data into a Signature control:
blob lblb_rtf
integer li_file, li_rtn
li_file = FileOpen("\My Documents\testb.rtf", &
StreamMode!, Read!)
FileRead( li_file, lblb_rtf )
FileClose( li_file )
li_rtn = sig_1.SetDataAsRTF(lblb_rtf)
The following example reads data in RTF format from a file into a Unicode string, then sets the data into a Signature control:
string ls_rtf
integer li_file, li_rtn
li_file = FileOpen("\My Documents\tests.rtf", &
StreamMode!, Read!)
FileRead( li_file, ls_rtf )
FileClose( li_file )
li_rtn = sig_1.SetDataAsRTF(ls_rtf)
| Copyright © 2004. Sybase Inc. All rights reserved. |
|
|