|
|
|
|
Añade un enlace a una sección de texto en un RTF Editar control. Los clics en este enlace se procesan de forma programada. // == Global declarations of the window == arrLinkTarget is array of strings // == Click the "Add a note" button == 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 RTF edit control RTFAddLink(EDT_Edit, EDT_Edit.Cursor, ... EDT_Edit.CursorEnd, ClickOnLink, LinkRank) END
// == ClickOnLink procedure == PROCEDURE ClickOnLink(LinkRank is int) InfoBuild("The note associated with the %1 link is: %2", LinkRank, ... arrLinkTarget[LinkRank]) Sintaxis
RTFAddLink(<Edit control> , <Start position of the link> , <End position of the link> , <WLanguage procedure> [, <Procedure parameter>])
<Edit control>: Cadena de caracteres Nombre del RTF control Campo de entrada a utilizar. <Start position of the link>: Integro Posición del primer carácter del enlace. El índice del primer carácter del control es set a 1. La función no tiene ningún efecto si la posición inicial del enlace es mayor que el tamaño del texto.. <End position of the link>: Integro Posición del primer carácter después del enlace. La función no tiene ningún efecto si la posición final del eslabón es inferior a la posición inicial del eslabón.. <WLanguage procedure>: Nombre de Procedure Nombre del WLanguage Procedure llamado cuando se hace clic en el enlace. <Procedure parameter>: Variante opcional Parámetro que se pasará a la Procedure cuando se haga clic en el enlace. Si no se especifica este parámetro, la Procedure no recibirá ningún parámetro. Observaciones - RTFAddLink se puede utilizar en controles de edición estándar y RTF.
- Para borrar un enlace, todo lo que tiene que hacer es reasignar la sección de texto correspondiente.
- Los enlaces añadidos con RTFAddLink no se conservan:
- al copiar en el portapapeles.
- al llamar a ScreenToFile. En este caso, sólo se copia el contenido RTF en el buffer HFSQL.
- En un control RTF, las envolturas de Line corresponden a un personaje.
- Puede set el Color de enlaces con LinkColor.
- Puede set el Color de los enlaces añadidos con RTFAddLink utilizando LinkColorRTF.
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|