Page 1 of 1

DrawStyleText DrawLine issue

Posted: Tue Jun 24, 2025 9:13 pm
by whisper1980
I am using the trial version under Delphi 12.3

I am using the OnDrawStyleText event to colorize different types of hyperlinks. They all have underlines, some are grayed out, one type is blue and some I highlight with light yellow.

With out resizing the form in the example attached, loading foundations.rtf shows that the first hyperlink is blue as expected, but not underlined (but should be). Note that the same Foundation types hyperlink section was simply duplicated after the table, and that copy is both blue and underlined as it should be. The rest of the RTF text is colored properly unless I scroll up a bit, then suddenly all the lines are missing, but everything else is still properly colored (except the first hyperlink mentioned earlier). So the coordinates are not the problem.

I'm not sure why this is happening with the lines only. I've attached a modified version of your Editor 1 demo. Use it to load foundations.rtf

Thoughts?
Eric

Re: DrawStyleText DrawLine issue

Posted: Wed Jun 25, 2025 12:22 pm
by Sergey Tkachenko
What's your code in OnDrawStyleText?

Re: DrawStyleText DrawLine issue

Posted: Wed Jun 25, 2025 3:53 pm
by whisper1980
It's in the "Editor 1 modified.zip" file I provided so you can view the code and test. Are you not able to access or open that attachment?