This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
WP SELECT
|
WP SELECT ( {{* ;} wpArea;} {targetObj} {; startRange ; endRange} ) | ||||||||
Parameter | Type | Description | ||||||
* | Operator |
![]() |
If specified, wpArea is a form object name (string). If omitted, wpArea is an object field or variable (document) | |||||
wpArea | String, Object |
![]() |
Form object name (if * is specified) or 4D Write Pro object variable or field (if * is omitted) | |||||
targetObj | Object |
![]() |
Range or element or 4D Write Pro document | |||||
startRange | Longint |
![]() |
Starting offset of text range | |||||
endRange | Longint |
![]() |
Ending offset of text range | |||||
The WP SELECT command creates a new selection in the 4D Write Pro wpArea area, based upon the targetObj or a new range defined by startRange and endRange.
If you pass the optional * parameter, you indicate that wpArea is a form object name (string). If you do not pass this parameter, you indicate that wpArea is a 4D Write Pro object variable or field. If no 4D Write Pro area is passed in the wpArea parameter, the command does nothing.
Note: This command can only be used if the wpArea is associated with a form object (i.e. it is displayed in the current form/page).
To define the selection, you can either pass an existing object in targetObj, or pass a pair of startRange / endRange boundaries.
The following syntaxes are supported:
where startRange and endRange are allowed only for the following elements: body / header / footer / section / sub-section.
In startRange and endRange, pass values corresponding to the position of the first and last characters to select in the area. You can pass wk start text in startRange to define the beginning of the area, and wk end text in endRange to define the end of the area. Keep in mind that a 4D Write Pro document not only contains visible text but also formatting tags that are included in the range.
The following code:
$range:=WP Text range([SAMPLE]WP;wk start text;12)
WP SELECT(*;"WParea";$range)
... will have the same result as:
WP SELECT(*;"WParea";wk start text;12)
Product: 4D
Theme: 4D Write Pro Language
Number:
1348
Created: 4D v15 R4
Modified: 4D v16 R5
Modified: 4D v16 R6
Modified: 4D v17 R3
4D Write Pro Reference ( 4D v20 R7)