Page 1 of 1
Function at same as "Memo.Text" ?
Posted: Fri Feb 03, 2006 9:50 am
by RichEnjoyer
Hallo,
how become all chars in one string?
best wishes, Frank
Posted: Fri Feb 03, 2006 3:19 pm
by Sergey Tkachenko
See the functions in RVGetText.pas.
Or, if you need one-to-one correspondence between the document and the resulting string, functions from RVLinear.pas
Re: Function at same as "Memo.Text" ?
Posted: Sat Feb 04, 2006 5:50 pm
by Yernar Shambayev
RichEnjoyer wrote:Hallo,
how become all chars in one string?
best wishes, Frank
function AllText(MyRV: TCustomRichView): string;
begin
MyRV.SelectAll;
Result := Trim(MyRV.GetSelText);
end;
Posted: Sun Feb 05, 2006 9:38 pm
by Sergey Tkachenko
Yernar, this procedure actually returns all the text (not necessary to Trim it), but :
1) it modifies RichView state (selects all document)
2) it requires document to be formatted (this is a disadvantage if you want load documents from files/database and quickly extract text from them)