Page 1 of 1

TRichViewEdit Hovering Problem

Posted: Sun Jun 14, 2020 8:13 pm
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?

Re: TRichViewEdit Hovering Problem

Posted: Sun Jun 14, 2020 8:29 pm
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)

Re: TRichViewEdit Hovering Problem

Posted: Sun Jun 14, 2020 10:30 pm
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

Re: TRichViewEdit Hovering Problem

Posted: Sun Jun 14, 2020 10:59 pm
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

Re: TRichViewEdit Hovering Problem

Posted: Mon Jun 15, 2020 9:27 am
by Mamat Teguh
Is anyone having the same problem?

Re: TRichViewEdit Hovering Problem

Posted: Mon Jun 15, 2020 9:37 am
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.

Re: TRichViewEdit Hovering Problem

Posted: Mon Jun 15, 2020 9:49 am
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

Re: TRichViewEdit Hovering Problem

Posted: Mon Jun 15, 2020 9:54 am
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.

Re: TRichViewEdit Hovering Problem

Posted: Mon Jun 15, 2020 4:39 pm
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)

Re: TRichViewEdit Hovering Problem

Posted: Mon Jun 15, 2020 5:07 pm
by Mamat Teguh
Problems solved by adding the 4th parameter. THANK YOU so much Sergey bro! :D