richedit.text

General TRichView support forum. Please post your questions here
Post Reply
erikvdw
Posts: 40
Joined: Tue Feb 28, 2006 8:27 am

richedit.text

Post by erikvdw »

How can I get the full text of the richedit?
Is there something like memo.text ?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Unit RVGetText contains the following functions:

Code: Select all

// Returns text of line with caret
function GetCurrentLineText(rve: TCustomRichViewEdit): String;

// Returns visible text (may be, with a line before and after)
function GetVisibleText(rv: TCustomRichView): String;

// Returns all text
function GetAllText(rv: TCustomRichView): String;

// Returns all text in RVData
function GetRVDataText(RVData: TCustomRVData): String;

// Returns text of paragraph section with caret
// (paragraph section is a part of document limited either by
// paragraph breaks or by new line breaks (added with Shift+Enter)
function GetCurrentParaSectionText(rve: TCustomRichViewEdit): String;

// Returns text of paragraph with caret
function GetCurrentParaText(rve: TCustomRichViewEdit): String;

// Returns character to the left of caret.
// If caret is at the beginning of line, - to the right.
// If no character, returns empty string
function GetCurrentChar(rve: TCustomRichViewEdit): String;

// Returns the current word
function GetCurrentWord(rve: TCustomRichViewEdit): String;
Use GetAllText.

Unit RVGetTextW contains functions wih the same names, returning WideString
erikvdw
Posts: 40
Joined: Tue Feb 28, 2006 8:27 am

Thanks

Post by erikvdw »

Thanks
j&b
Posts: 184
Joined: Mon Sep 05, 2005 1:35 pm

Post by j&b »

You have one forgotten: GetSelText

memo.format; memo.selectAll;
s:=memo.GetSelText;
ShowMessage(s);
Post Reply