Using rich text in an application – PB Docs 100

Using rich text in an application

Rich text format (RTF) is a standard for specifying formatting
instructions and document content in a single ASCII document. An
editor that supports rich text format interprets the formatting
instructions and displays the text with formatting.

In an application, you may want to:

  • Provide
    a window for preparing rich text documents
    Although not a full-fledged word processor, the RichTextEdit
    control allows the user to apply formatting to paragraphs, words,
    and characters.
  • Create a mail-merge application
    You or the user can set up boilerplate text with input fields
    associated with database data.
  • Display reports with formatted text
    A RichText DataWindow object is designed for viewing data,
    rather than entering data. It does not have the edit styles of other
    DataWindow presentation styles.
  • Store rich text as a string in a database and display
    it in a RichTextEdit control

Sources of rich text

Any word processor

You can prepare rich text in any word processor that can save
or export rich text format.

Input fields in PowerBuilder only

Although many word processors support some kinds of fields,
the fields are usually incompatible with other rich text interpreters.
If you want to specify input fields for a PowerBuilder application,
you will have to insert them using the PowerBuilder RichTextEdit control.

Rich text in the database

Since rich text is represented by ASCII characters, you can
also store rich text in a string database column or string variable.
You can retrieve rich text from a string database column and use
the PasteRTF function to display the text with formatting
in a RichTextEdit control.


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x