Board index » cppbuilder » TRichEdit: How to display selected text

TRichEdit: How to display selected text


2007-07-27 05:16:59 AM
cppbuilder88
How do you make the display area of a TRichEdit 'jump' to SelText? I
have a large file and do a string search; there are several matches, but
not in the visible viewing area. If you scroll down, of course, you
find it, but I'd like a 'Find' button that puts the found text in the
visible part of the window somewhere, and jumps to the next found text
every time you click. Much like the search behavior in Word. I don't see
any methods or properties in TRichEdit that allow you to programatically
manipulate the text displayed in the window. tx
 
 

Re:TRichEdit: How to display selected text

Found it by accident:
RichEdit->Perform(EM_SCROLLCARET,0,0);
Mike K wrote:
Quote
How do you make the display area of a TRichEdit 'jump' to SelText? I
have a large file and do a string search; there are several matches, but
not in the visible viewing area. If you scroll down, of course, you
find it, but I'd like a 'Find' button that puts the found text in the
visible part of the window somewhere, and jumps to the next found text
every time you click. Much like the search behavior in Word. I don't see
any methods or properties in TRichEdit that allow you to programatically
manipulate the text displayed in the window. tx