4D Write v14

WR GET SELECTION

Home

 
4D Write v14
WR GET SELECTION

WR GET SELECTION 


 

WR GET SELECTION ( area ; first ; last ) 
Parameter Type   Description
area  Longint in 4D Write area
first  Longint in Receives first character
last  Longint in 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.

Example  

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

 
PROPERTIES 

Product: 4D Write
Theme: WR Text Manipulation
Number: 89199

 
HISTORY 

Created: 4D Write 6

 
ARTICLE USAGE

4D Write Language ( 4D Write v11.6)
4D Write Language ( 4D Write v12)
4D Write Language ( 4D Write v14)
4D Write Language ( 4D v13)
4D Write Language ( 4D Write v14 R2)
4D Write Language ( 4D Write v14 R3)
4D Write Language ( 4D Write v14 R4)