PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • The RTF format
  • Edit control in RTF format
  • Notes
  • Supported RTF format
  • Defining the initial content of an RTF edit control
  • Colors in Pocket PC
  • Writing into an RTF edit control by programming (by using the RTF attributes)
  • Saving a text in an RTF file
  • Performing a "Find/Replace" operation in an edit control in RTF format
  • Handling the characters in an edit control in RTF format
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The RTF format
The RTF (Rich Text Format) is used to code the text and the graphics specifically in order to simplify their transfer from an application to another one.
The RTF is a "tagged" format. Indeed, specific tags are used to specify the style of each word, group of words or sentences found in the text in RTF.
WINDEV allows you to handle text in RTF format via the "RTF format" option of edit controls and static controls.
Versions 16 and later
You also have the ability to use ..RichEdit to modify the RTF type of a control by programming.
New in version 16
You also have the ability to use ..RichEdit to modify the RTF type of a control by programming.
You also have the ability to use ..RichEdit to modify the RTF type of a control by programming.
  • If the text in RTF format is displayed in a control that does not support the RTF format, the tags will be displayed.
  • If the text in RTF format is displayed in a control that supports the RTF format, the tags will be automatically interpreted and the text will be formatted accordingly.
Note: To use an edit control in RTF format, the "RICHED20.DLL" file must be found on the current computer. In most cases, the "RICHED20.DLL" file is found in the system directory of Windows. If a later version of the RTF control is available on the computer (including the RTF 4.1 control installed with Windows XP Service Pack 1), this version is used.
Edit control in RTF format
An RTF edit control is used to display a text in RTF format and to enter a text in RTF format.
When entering a text in an RTF control, this text is in RTF format. This text contains all the tags required to format the RTF.

Notes

  • Windows Mobile The RTF control is used to display and enter a RTF text. However, the formatting of the text cannot be modified.
  • If the same text is entered in a standard edit control and in an RTF edit control, the character string found in the RTF edit control will be longer than the string found in the standard edit control (because the RTF tags are added).
  • The RTF edit control supports basic RTF formatting, so it can be used on any platform. The specific characters such as the page breaks, the notes, ... are not supported.

Supported RTF format

The format of the RTF files supported is the same RTF format as the one supported by "Wordpad" (up to Windows XP).
If the RTF file is generated by another tool (Word, ...), we advise you to open the file in Wordpad in order to check the RTF compatibility. The display of the file in Wordpad will provide a better preview of what will be printed.
In all cases, we recommend that you re-save the file in Wordpad to force the format of RTF.
Note: You also have the ability to force the RTF format with WINDEV or WEBDEV. To do so, RTFLoad must be used to assign the RTF control.
Defining the initial content of an RTF edit control
To define the initial content of an RTF edit control (solution 1):
  1. Display the "Content" tab of the description of RTF edit control.
  2. Type the content of RTF control in the "Initial content" control. To format the text, display the formatting toolbar via the "RTF formatting toolbar" option found in the popup menu of "Initial content" control.
  3. Validate the description window.
To define the initial content of an RTF edit control (solution 2):
  1. Type your text and format it via any RTF editor (Word, WINDEV document editor, ...)
  2. Copy this text (Ctrl + C).
  3. Display the "Content" tab of the description of RTF edit control.
  4. Paste the RTF text. The text is displayed with its formatting.
Windows Mobile

Colors in Pocket PC

On the non-VGA Pocket PCs, only the primary colors are supported. The other columns are displayed in black.
Writing into an RTF edit control by programming (by using the RTF attributes)
Saving a text in an RTF file
Performing a "Find/Replace" operation in an edit control in RTF format
Handling the characters in an edit control in RTF format
Related Examples:
The RTF edit control Unit examples (WINDEV Mobile): The RTF edit control
[ + ] Using text in RTF format in the edit controls.
This format is very useful to format and view data.
Management of RTF Unit examples (WINDEV): Management of RTF
[ + ] Using the main functions for RTF management in a WINDEV application:
- Load a file in RTF format
- Save a file in RTF format
- Find and select a word in an RTF text
- Display a text in RTF format
- Modify the characteristics of a selection (font, case, color, ...)
The special characters Unit examples (WINDEV): The special characters
[ + ] Handling special characters in an RTF control and viewing the ASCII and ANSI codes.
Switching from the RTF format to the HTML format Unit examples (WINDEV): Switching from the RTF format to the HTML format
[ + ] Using RTFToHTML and RTFToText.
WD Sending faxes Sample components (WINDEV): WD Sending faxes
[ + ] This example is using the WINDEV SendingFaxes component.

This component is used to send a FAX typed in text or RTF format.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment