PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Initializing a Rich Text Area control
  • Modifying one or more elements in a Rich Text Area control
  • Retrieving the value of a Rich Text Area control
  • Properties specific to the management of a Rich Text Area control
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
Handling a Rich Text Area control by programming
Overview
To handle a Rich Text Area control by programming, all you have to do is use the variable of the Rich Text Area control in the code.
The variable of the Rich Text Area control corresponds to the name of the control.
Initializing a Rich Text Area control
To initialize a Rich Text Area control, you can:
  • initialize the control with the HTML code. This allows you to format the content of the control by programming.
    For example:
    // Modify the Rich Text Area
    RTA_MODIFIABLE = "This section was " + ...
    "modified
    "
  • use ..Value or ..CaptionHTML.

Modifying one or more elements in a Rich Text Area control

A Rich Text Area control can contain links or images. To modify the information regarding a link or an image found in the control, all you have to do is handle the requested element by programming.
For example, a Rich Text Area control contains a link and an image. The caption and the URL of the link change, depending on whether the Web user is connected or not. Similarly, the image displayed is different. In this case, all you have to do is directly handle the Link and Image controls.
// Modify the link and the image found in the RTA_Home control
IF bConnected = True THEN
LINK_Connection..Caption = "Disconnect"
LINK_Connection..URL = "www.mysite.fr"
IMG_Logo = "User_Logo.gif"
ELSE
LINK_Connection..Caption = "Connect"
LINK_Connection..URL = "www.mysite.fr\Login.htm"
IMG_Logo = "Logo.gif"
END
Retrieving the value of a Rich Text Area control
To retrieve the content of a Rich Text Area control:
  • perform a simple assignment. For example:
    CurrentContent = RTA_Overview
  • handle the Rich Text Area control directly. For example:
    Trace(RTA_Overview)
  • use ..Value or ..CaptionHTML.
Note: The retrieved text corresponds to the HTML code of the control.
Properties specific to the management of a Rich Text Area control
The following properties are used to manage the characteristics of a Rich Text Area control by programming:
Versions 19 and later
CaptionHTML
New in version 19
CaptionHTML
CaptionHTML
..CaptionHTML is used to handle the caption of a control in HTML format.
To find out the entire list of WLanguage properties that can be used with a Rich Text Area control, see Properties associated with a Rich Text Area control.
Minimum required version
  • Version 19
Comments
Click [Add] to post a comment