TRichViewEdit Hovering Problem

General TRichView support forum. Please post your questions here
Post Reply
Mamat Teguh
Posts: 12
Joined: Sun Jun 14, 2020 7:16 pm

TRichViewEdit Hovering Problem

Post by Mamat Teguh »

Hi. First, sorry for my english.

The question is: When i use jump and enable hovering with 1 sentence in multi lines, say it 2 lines, why richviewedit only hover the line that have cursor on it? Example:

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make
a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining
essentially unchanged.


When i put my cursor on "It has survived not only five centuries, but also the leap into electronic typesetting, remaining
essentially unchanged.
" why it only hover "It has survived not only five centuries, but also the leap into electronic typesetting, remaining"?

And when i move to "essentially unchanged", the rest are not hovered. They have same jump ID, same sentence, but the hover mark seems cannot mark multiline. How to solve this?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: TRichViewEdit Hovering Problem

Post by Sergey Tkachenko »

I cannot reproduce this problem. Please save this document as RVF file and send it to me (to email richviewgmailcom or attach to this forum)
Mamat Teguh
Posts: 12
Joined: Sun Jun 14, 2020 7:16 pm

Re: TRichViewEdit Hovering Problem

Post by Mamat Teguh »

Hi Sergey. For better understanding, i just made a video for you. Please take a look. What i want is, if my mouse is on top of 2ND sentence, all the text of 2nd sentence must be hovered of changed to red, because the jump's ID is same. How to fix this? Or is this a bug?


https://youtu.be/511Q2DshSrQ
Mamat Teguh
Posts: 12
Joined: Sun Jun 14, 2020 7:16 pm

Re: TRichViewEdit Hovering Problem

Post by Mamat Teguh »

In case you need the source, i only wrote this
procedure TForm1.RichViewEdit1RVMouseMove(Sender: TObject; id: Integer);
begin
Form1.Caption:='Jump ID ='+inttostr(ID);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
RichViewEdit1.Clear;
RichViewEdit1.AddNL('THIS IS 1ST SENTENCE. THE TEXT COLOR FOR 1ST SENTECE ARE CHANGED! ',4,0);
RichViewEdit1.AddNL('',0,0);
RichViewEdit1.AddNL('THIS IS 2ND SENTENCE. THIS IS BAD!. ONLY TOP OR BOTTOM LINE OF SENTENCE IS MARKED DEPEND ON MOUSE POSITION! HOW TO FIX THIS?',4,0);
RichViewEdit1.Format;
end;
The RichViewEdit is ReadOnly and the align is Client. Thank you
Mamat Teguh
Posts: 12
Joined: Sun Jun 14, 2020 7:16 pm

Re: TRichViewEdit Hovering Problem

Post by Mamat Teguh »

Is anyone having the same problem?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: TRichViewEdit Hovering Problem

Post by Sergey Tkachenko »

In the current version of TRichView, if you want to highlight a link consisting of multiple hypertext items, all of them must have identical non-empty tag.
Mamat Teguh
Posts: 12
Joined: Sun Jun 14, 2020 7:16 pm

Re: TRichViewEdit Hovering Problem

Post by Mamat Teguh »

But in that video, you can see the 2nd sentence have same jump ID and still the text color only changed in part that have cursor on it
Mamat Teguh
Posts: 12
Joined: Sun Jun 14, 2020 7:16 pm

Re: TRichViewEdit Hovering Problem

Post by Mamat Teguh »

No. i think you missunderstood. I meant if the text is too long, then it will continue in the next line right? but the hover effect only applied in the text with cursor on it, even it has same jump ID.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: TRichViewEdit Hovering Problem

Post by Sergey Tkachenko »

Just try to specify a not-empty tag, in the 4-th parameter of AddNL.
For example, 'test' (must be the same in all calls of AddNL)
Mamat Teguh
Posts: 12
Joined: Sun Jun 14, 2020 7:16 pm

Re: TRichViewEdit Hovering Problem

Post by Mamat Teguh »

Problems solved by adding the 4th parameter. THANK YOU so much Sergey bro! :D
Post Reply