I'm using a TRichViewEdit as a chat text control. The problem I am having is that certain operations, such as scanning for URLs makes the control set focus to itself, which is really annoying when you're trying to type in another control.
I'm using HTML and the HTML Importer, as well as a scan url procedure.
Is there any way to prevent SetSelectionBounds from setting the focus to the control? It makes programatic adding of text impossible to work with.
TRichview and auto set focus
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Well, while you're at it, check and see if it makes it automatically scroll to the end. I removed rvoScrollToEnd from the RichEdit Options, and when I import the table, it still scrolls to the end.
I'm "basically" doing this:
FRichView.ReadOnly := false;
FRVHtmlImporter.LoadHtml(Content.BodyExtended);
FFirstAdd := false;
FRichView.FormatTail;
ScanForURLS;
FRichView.FormatTail;
FRichView.ReadOnly := true;
I did modify the scanForUrls to work on just the recently added HTML, since scanning from the beginning of the document caused issues.
I'm "basically" doing this:
FRichView.ReadOnly := false;
FRVHtmlImporter.LoadHtml(Content.BodyExtended);
FFirstAdd := false;
FRichView.FormatTail;
ScanForURLS;
FRichView.FormatTail;
FRichView.ReadOnly := true;
I did modify the scanForUrls to work on just the recently added HTML, since scanning from the beginning of the document caused issues.