Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 216
  • Last Modified:

RichEdit search prob...

Hi there!!!

I have a RichEdit text field which contains more lines than it can be displayed without scrolling down. My problem is when i search for text in the RichEdit lines, and find what i'm search for, I can't see the founded(focused) text without scrolling down to it. How do i get the RichEdit to automaticaly scroll down to my found and "focused" text?

Thanks in advance for any help.

1 Solution
I used this code in TRichEdit component, I'm not sure if it works with TDBRichEdit component.

After finding your word make it selected text, example:

RichEdit1.SelStart:= FindIndex; // Found position
RichEdit1.SelLength:= Length(Edit1.Text); // Word to search

Make sure that HideSelection is False

JohnWhoAuthor Commented:
Thanks alot Motaz, you solved my prob. My HideSelection was set to true, bump.


Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now