Garry's Mod Wiki

Panel:GetSelectedTextRange

  number, number Panel:GetSelectedTextRange()

Description

Returns the currently selected range of text.

This function will only work on RichText and TextEntry panels and their derivatives.

Returns

1 number start
The start of the range. If no text is selected it may be 0 and/or equal to the end range.
2 number endrange
The end of the range. If no text is selected it may be 0 and/or equal to the start range.