InsertDocument
method (DataWindows)
Description
Inserts a rich text format or plain text file into a DataWindow
control or DataStore object.
The new content is added in one of two ways:
-
The new content can be inserted at the insertion point.
-
The new content can replace all existing content.
Applies to
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataStore object |
Syntax
PowerBuilder
1 |
integer dwcontrol.InsertDocument ( string filename, boolean clearflag, FileType filetype) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control or DataStore |
filename |
A string whose value is the name of the file you want |
clearflag |
A boolean value specifying whether the new file will
|
filetype |
A value of the FileType enumerated datatype
|
Return value
Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, InsertDocument returns null.
Usage
When the control supports headers and footer (the HeaderFooter
property is set to true), inserting a document can replace, but not add
to, existing header and footer text. You must set clearflag to true to
replace the existing header and footer text with header and footer text
from the inserted document.
Not all RTF formatting is supported. PowerBuilder supports version
1.6 of the RTF standard, except for the following:
-
No support for formatted tables
-
No drawing controls
Any unsupported formatting is ignored.
PowerBuilder environment
For use with other PowerBuilder RichTextEdit controls, see the section called “InsertDocument” in PowerScript Reference.
Examples
This example inserts a document into a RichTextEdit
DataWindow:
1 2 3 |
integer rtn rtn = dw_1.InsertDocument("c:pb est.rtf", & false, FileTypeRichText!) |
See also
DataSource in the section called “DataSource” in PowerScript Reference
InputFieldInsert in the section called “InputFieldInsert” in PowerScript Reference
InsertPicture in the section called “InsertPicture” in PowerScript Reference