4D Write v16WR GET SELECTION |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D Write v16
WR GET SELECTION
|
WR GET SELECTION ( area ; first ; last ) | ||||||||
Parameter | Type | Description | ||||||
area | Longint |
![]() |
4D Write area | |||||
first | Longint |
![]() |
Receives first character | |||||
last | Longint |
![]() |
Receives last character | |||||
The WR GET SELECTION command returns, in the first and last variables, the positions of the selected text in Area.
first is always one less than the first character selected. last is always equal to the last character selected. If first and last are equal, no text is selected and the insertion point is positioned after the character described by first.
The following example sets the margins of the whole document and retrieves the original selection:
WR GET SELECTION(area;StartSel;EndSel) `Re-reading the current selection
WR EXECUTE COMMAND(area;wr cmd select all) `Select all
`Setting margins
WR SET TEXT PROPERTY(area;wr left margin;49)
WR SET TEXT PROPERTY(area;wr first indent;49)
WR SET TEXT PROPERTY(area;wr right margin;504)
WR SET SELECTION(area;StartSel;EndSel) `Resetting the selection
Product: 4D Write
Theme: WR Text Manipulation
Number:
89199
Created: 4D Write 6
4D Write Language ( 4D Write v16)