Text.setSelection

Sets the selection to the range specified by the given point, where the x coordinate represents the start index and the y coordinate represents the end index. <p> Indexing is zero based. The range of a selection is from 0..N where N is the number of characters in the widget. </p><p> Text selections are specified in terms of caret positions. In a text widget that contains N characters, there are N+1 caret positions, ranging from 0..N. This differs from other functions that address character position such as getText () that use the usual array indexing rules. </p>

@param selection the point

@exception IllegalArgumentException <ul> <li>ERROR_NULL_ARGUMENT - if the point is null</li> </ul> @exception SWTException <ul> <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> </ul>

  1. void setSelection(int start)
  2. void setSelection(int start, int end)
  3. void setSelection(Point selection)
    class Text
    void
    setSelection

Meta