4D v13

WR GET SELECTION

Home

 
4D Write v13
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
Theme: WR Text Manipulation
Number: 89199

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Write 6