Command WR Get selected text

4D Write

WR Get selected text

version 11 (Modified)


WR Get selected text (area) Text

ParameterTypeDescription
areaLongint4D Write area

Function result Text Text selected in area

Description

The command WR Get selected text returns the selected text in area.

If your database is not running in Unicode mode but in ASCII compatibility mode (former version 4D databases that are converted without the "Unicode Mode" preference being selected), the text returned will only contain the first 32,000 characters.

Example

1. The following example places the selected text in area into the variable vText.

   vText:=WR Get selected text (area)

2. Your database was created with a former version of 4D and it was not configured in Unicode mode. You want to test the case where you have selected more than 32,000 characters:

   C_LONGINT($start;$end)
   C_TEXT($text)

   WR GET SELECTION (WritePicture;$start;$end) `Recovery of selection limits
   If ($end-$start>=32000)   `If the difference is greater than or equal to 32,000, the selection returned will be truncated
      ALERT("Only the first 32,000 characters will be recovered.")
   End if 
   $text:=WR Get selected text(WritePicture)

See Also

WR GET PARAGRAPHS, WR GET SELECTION, WR Get text, WR GET WORDS.