Schultz’s PowerBuilder Notes

Rich Text Edit

A rich text edit control is generally more sophisticated than a rich text DataWindow.

· Capable of insert, edit and delete of input fields dynamically

· Can save as RTF file

· Multiple undo processing

How do I create?

  1. Drop control and set properties
  2. Provide methods to insert the text. Inserting text can be done manually or programmatically.
  3. Prove methods to place input fields. The InputFieldInsert function is used. Column name must match DataWindow column name.
  4. Provide methods to merge the data with DataStore.

How do I load the rich text edit control programmatically?

1) Use the InsertDocument( ) function. A true will replace existing document, false will append.

Rte_1.InsertDocument(“mydoc.rtf”, true)

2) Use the SelectText( ) function to position text?

Rte_1.SelectText(3,1,0,0)

3) Use the InputFieldInsert( ) function to insert the text

Rte_1.InputFieldInsert(“company_name”)

April 5, 2008 - Posted by rick130 | 1. PowerBuilder General, Window Controls | , , , , , , | No Comments Yet

No comments yet.

Leave a comment