TRVChat.GetSelectedMessage, GetRangeOfSelectedMessages

<< Click to display table of contents >>

TRVChat.GetSelectedMessage, GetRangeOfSelectedMessages

The methods return message(s) that contains a selected fragment in ChatRichView.

function GetSelectedMessage: TRVChatMessage;

 
function GetRangeOfSelectedMessages(

  out FirstIndex, LastIndex: Integer): Boolean;

Parameters

GetSelectedMessage returns a message that contains selected items. It returns nil if there is no selection in ChatRichView, if the selection is outside a message (for example, on a date), or if the selection starts in one message and ends in another.

GetRangeOfSelectedMessages returns the range of messages that are at least partially selected, as indexes in Messages collection (or -1, if messages are not selected).

Do not confuse GetSelectedMessages with HighlightedMessage. GetSelectedMessages returns the message containing the selected fragment, while HighlightedMessage is set manually by the programmer.