AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones de controles
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Adds a link to a text section in an edit control. Clicks on this link are processed programmatically.
Ejemplo
// == Global declarations of the window ==
arrLinkTarget is array of strings
// == Click on the Button control "Add a note" ==
LinkRank is int
Destination is string
 
// Asks for a note to associate with the link
IF Input("Enter a note associated with this link: ", Destination) = 1 THEN
 
// Stores the note in an array
LinkRank = Add(arrLinkTarget, Destination)
 
// Adds the link into the edit control
AddLink(EDT_Edit, EDT_Edit.Cursor, ...
EDT_Edit.CursorEnd, ClickOnLink, LinkRank)
END
// == ClickOnLink procedure ==
PROCEDURE ClickOnLink(LinkRank is int)
InfoBuild("The rating associated with link %1 is: %2", LinkRank, ...
		arrLinkTarget[LinkRank])
Sintaxis
AddLink(<Edit control> , <Start position of the link> , <End position of the link> , <WLanguage procedure> [, <Procedure parameter>])
<Edit control>: Control name
Name of the Edit control to be used.
<Start position of the link>: Integer
Position of the first character of the link. The index of the first character 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 the 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.
For more details on this procedure, see Parameters of the procedure used by AddLink.
<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.
Observaciones
  • AddLink can be used on text and RTF Edit controls (but not on HTML Edit controls).
  • To remove a link, simply update the content of the control (without the link).
  • Links added with AddLink are lost when content is copied to the clipboard or when ScreenToFile is called. In the latter case, only the HTML content is copied into the HFSQL buffer.
  • The color of the links can be configured by LinkColor.
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 15
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 04/10/2024

Señalar un error o enviar una sugerencia | Ayuda local