DrawStyleText DrawLine issue

General TRichView support forum. Please post your questions here
Post Reply
whisper1980
Posts: 20
Joined: Sun May 25, 2025 6:41 pm

DrawStyleText DrawLine issue

Post 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
Attachments
Editor 1 modified.zip
(83.31 KiB) Downloaded 8 times
Missing top line only.png
Missing top line only.png (36.36 KiB) Viewed 1728 times
Missing all lines.png
Missing all lines.png (34.31 KiB) Viewed 1728 times
Sergey Tkachenko
Site Admin
Posts: 17852
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: DrawStyleText DrawLine issue

Post by Sergey Tkachenko »

What's your code in OnDrawStyleText?
whisper1980
Posts: 20
Joined: Sun May 25, 2025 6:41 pm

Re: DrawStyleText DrawLine issue

Post 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?
Post Reply