PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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 following functions are used to manage the RTF edit controls:
Versions 09 and later
RTFAdd
New in version 09
RTFAdd
RTFAdd
Adds a character string (in RTF format or not) at the end of RTF edit control, RTF control in a report or character string containing a text in RTF format.
Versions 19 and later
RTFAddLink
New in version 19
RTFAddLink
RTFAddLink
Adds a link onto a text section in an RTF edit control.
Versions 09 and later
RTFInsert
New in version 09
RTFInsert
RTFInsert
Inserts a character string in RTF format into the content of an RTF control (found in a window or in a report) or into the content of a character string in RTF format.
Versions 09 and later
RTFLoad
New in version 09
RTFLoad
RTFLoad
Loads a file in RTF format in an RTF control (found in a window or in a report).
Versions 09 and later
RTFReplace
New in version 09
RTFReplace
RTFReplace
Replaces or inserts a character string in an RTF control (found in a window or in a report) or in a string in RTF format (containing a text in RTF format).
Versions 09 and later
RTFSearch
New in version 09
RTFSearch
RTFSearch
Finds a character string in an RTF control (found in a window or in a report) or in a character string containing text in RTF format.
Versions 09 and later
RTFSelection
New in version 09
RTFSelection
RTFSelection
Changes or lists the attributes of the text currently selected in an RTF control (found in a window or in a report).
Versions 10 and later
RTFToHTML
New in version 10
RTFToHTML
RTFToHTML
Returns the HTML string corresponding to the specified RTF string.
Versions 09 and later
RTFToText
New in version 09
RTFToText
RTFToText
Returns the text without the formatting characteristics specific to the RTF format.
Related Examples:
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, ...)
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.
The special characters Unit examples (WINDEV): The special characters
[ + ] Handling special characters in an RTF control and viewing the ASCII and ANSI codes.
WD Coloring Search Training (WINDEV): WD Coloring Search
[ + ] This example explains how to highlight the sought words in the result of a full-text search.
It is performed via a highlighting in yellow.
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.
Minimum required version
  • Version 9
Comments
Exemplo Colorir String - RTF
Exemplo Colorir String - RTF

n_tamanho_cnpj_i,n_tamanho_cnpj_f,n_tamanho_inscricao_est_i,n_tamanho_inscricao_est_f is int=0
s_texto is string="Cnpj:"
n_tamanho_cnpj_i=Length(s_texto)
s_texto+="92.715.978.0001-58 "
n_tamanho_cnpj_f=Length(s_texto)

s_texto+=CR+"Insc.Est: "
n_tamanho_inscricao_est_i=Length(s_texto)
s_texto+="Isento"
n_tamanho_inscricao_est_f=Length(s_texto)
s_texto+=CR+"======================"

EDT_RTF_Text=s_texto
EDT_RTF_Text..Cursor=n_tamanho_cnpj_i
EDT_RTF_Text..CursorEnd=n_tamanho_cnpj_f
RTFSelection(EDT_RTF_Text,rtfColor,LightBlue)

EDT_RTF_Text..Cursor=n_tamanho_inscricao_est_i
EDT_RTF_Text..CursorEnd=n_tamanho_inscricao_est_f
RTFSelection(EDT_RTF_Text,rtfColor,LightMagenta)

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/08/curso-windev-string-014-rtf-colorir.html
https://www.youtube.com/watch?v=DbGYzz4QKi8
De matos AMARILDO
Aug. 09 2016