PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Adds a link onto a text section in an RTF edit control. The clicks on this link are processed through programming.
Example
// == Déclarations globales de la fenêtre ==
tabCibleLien is array of strings
 
// == Clic sur le bouton "Ajouter une note" ==
RangLien is int
Destination is string
 
// Demande une note à associer au lien
IF Input("Saisissez une note associée à ce lien:", ...
Destination) = 1 THEN
 
// Conserve la note dans un tableau
RangLien = Add(tabCibleLien, Destination)
 
// Ajoute le lien dans le champ de saisie RTF
RTFAddLink(SAI_Saisie, SAI_Saisie.Curseur, ...
SAI_Saisie.FinCurseur, ClicSurLien, RangLien)
END
// == Procédure ClicSurLien ==
PROCÉDURE ClicSurLien(RangLien is int)
InfoBuild("La note associée au lien %1 est: %2", RangLien, ...
tabCibleLien[RangLien])
Syntax
RTFAddLink(<Edit control> , <Start position of link> , <End position of link> , <WLanguage procedure> [, <Procedure parameter>])
<Edit control>: Character string
Name of the RTF edit control to use.
<Start position of link>: Integer
Position of the first character of the link. The subscript of the first character found in the control is set to 1. The function has no effect if the start position of the link is greater than the size of the text.
<End position of link>: Integer
Position of the first character after the link. The function has no effect if the end position of the link is less than the start position of the link.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure called when the link is clicked on.
<Procedure parameter>: Optional variant
Parameter that will be passed to the procedure when the link is clicked on. If this parameter is not specified, the procedure will receive no parameter.
Remarks
  • The RTFAddLink function can be used on text and RTF input fields.
  • To delete a link, all you have to do is reassign the corresponding text section.
  • Links added with the RTFAddLink function are not kept:
    • when copying to the clipboard.
    • when calling to ScreenToFile. In this case, only the RTF is copied to the HFSQL buffer.
  • In an RTF control, the line wraps correspond to a character.
  • Versions 22 and later
    It is possible to set the Color of the field links with the LinkColor function.
    New in version 22
    It is possible to set the Color of the field links with the LinkColor function.
    It is possible to set the Color of the field links with the LinkColor function.
  • Versions 26 and later
    It is possible to set the Color of links added via the RTFAddLink function with the LinkColorRTF function.
    New in version 26
    It is possible to set the Color of links added via the RTFAddLink function with the LinkColorRTF function.
    It is possible to set the Color of links added via the RTFAddLink function with the LinkColorRTF function.
Component: wd270obj.dll
Minimum version required
  • Version 19
This page is also available for…
Comments
Click [Add] to post a comment