4D v18WP Get links |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v18
WP Get links
|
WP Get links ( targetObj ) -> Function result | ||||||||
Parameter | Type | Description | ||||||
targetObj | Object |
![]() |
Range or element or 4D Write Pro document | |||||
Function result | Collection |
![]() |
Collection of links | |||||
The WP Get links returns the collection of all links defined in targetObj.
In the targetObj parameter, you can pass:
Returned value
WP Get links returns a collection of link objects, each of them containing one or more of the following properties:
Property | Type | Description | Available for |
[ ].url | Text | Link's target contents | url links |
[ ].method | Text | Link's method name | method links |
[ ].parameter | Text | Number | User parameter value passed to the link | method links (if used) |
[ ].bookmark | Text | Bookmark name for the link | bookmark links |
[ ].range | Object | Range of the link's label. See Range handling commands | all links |
You want to change the color of all url link labels in a 4D Write Pro document:
C_COLLECTION($links)
C_OBJECT($link)
$links:=WP Get links(myDoc)
For each($link;$links)
If($link.url#Null) //it's a url link
WP SET ATTRIBUTES($link.range;wk text color;"red")
End if
End for each
Product: 4D
Theme: 4D Write Pro Language
Number:
1643
Created: 4D v17 R5
4D Write Pro Reference ( 4D v18)