4D v16WP Get range |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16
WP Get range
WP Get range
The WP Get range command returns a new text range object (rangeObj) containing the selection between startRange and endRange in the wpArea 4D Write Pro area. Pass a 4D Write Pro object variable or field in wpArea. If no valid 4D Write Pro area is passed in the wpArea parameter, an empty rangeObj is returned. In startRange and endRange, pass values corresponding to the position of the first and last characters to select in the document. You can pass wk start text in startRange to define the beginning of the document, and wk end text in endRange to define the end of the document. 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 command returns a new rangeObj. A rangeObj is a 4D Write Pro text range object which can be used to handle attributes on a text selection (with the new WP GET ATTRIBUTES and WP SET ATTRIBUTES commands). It contains 3 private read-only attributes (wk range start, wk range end and wk range owner) that are used to defined the range itself. You want to select a range of 12 characters starting from the beginning of the 4D Write Pro field. The field is displayed in a form object: If you execute: $range2:=WP Get range([SAMPLE]WP;wk start text;12) ...the result is:
See also
|
PROPERTIES
Product: 4D HISTORY
Created: 4D v15 R4 ARTICLE USAGE
4D Write Pro Reference ( 4D v16) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||