Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005592 [JEDI VCL] 00 JVCL Components feature N/A 2011-06-06 08:55 2012-09-10 14:15
Reporter Gerold View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0005592: [JvRichEdit] New event and new function to add
Description Event to get informed when Mouse is over a link.

RichEdit control 2.0 or higher sends EN_LINK notification codes when it receives various messages, for example, when the user clicks the mouse or when the mouse pointer is over text that has the CFE_LINK effect.

In TJvCustomRichEdit.CNNotify, only Mouse button messages are handled.

Is it possible to handle the WM_MOUSEMOVE event too, so that we get informed when the mouse pointer is over text with CFE_LINK effect?

This would be the code to add:


type
  ...
  TRichEditURLHoverEvent = procedure(Sender: TObject; const URLText: string
    ) of object;
  ...

  TJvCustomRichEdit = class(TJvExCustomMemo)
  ...
    FOnURLHover: TRichEditURLHoverEvent;
  ...
    procedure URLHover(const URLText: string); dynamic;
  ...
    property OnURLHover: TRichEditURLHoverEvent read FOnURLHover write FOnURLHover;
  ...


  TJvRichEdit = class(TJvCustomRichEdit)
  ...
    property OnURLHover;
  ...


  ...
  procedure TJvCustomRichEdit.URLHover(const URLText: string);
  begin
    if Assigned(OnURLHover) then
      OnURLHover(Self, URLText);
  end;
  ...

  ...
  procedure TJvCustomRichEdit.CNNotify(var Msg: TWMNotify);
  ...
    EN_LINK:
      with PENLink(NMHdr)^ do
      begin
        case Msg of
          WM_RBUTTONDOWN:
          ...
          WM_MOUSEMOVE:
            begin
              URLHover(GetTextRange(chrg.cpMin, chrg.cpMax));
            end;
        end;
      end;
      ...

--------------------

Also, I often need to know the EM_CHARFROMPOS result in JvRichEdit.OnMouseMove. Could you add this function into JvRichEdit:

function TJvCustomRichEdit.CharFromPos(X,Y: Integer): Integer;
var
  Pt: TPoint;
begin
  Pt := Point(X, Y);
  Result := SendMessage(Handle, EM_CHARFROMPOS, 0, Integer(@Pt));
end;




Additional Information Would be nice if this could be added so I dont need to change the JvRichEdit.pas anymore after each update.

Thanks in advance
Tags No tags attached.
Attached Files zip file icon Demo.zip [^] (490,931 bytes) 2011-06-06 08:55
zip file icon JvRichEditTest.zip [^] (439,494 bytes) 2011-06-08 22:31
jpg file icon JCL Install Bug.JPG [^] (116,829 bytes) 2011-12-13 11:06
jpg file icon JVCL Install Bug.JPG [^] (36,646 bytes) 2011-12-13 11:06

- Relationships

-  Notes
(0018689)
obones (administrator)
2011-06-08 16:21

Can you provide your changes in a patch file as created by TortoiseSVN?
(0018703)
Gerold (reporter)
2011-06-08 22:39

I will try to provide the changes in a patch file created by TortoiseSVN.

In the meanwhile I attached another demo (JvRichEditTest.zip) with my modified JvRichEdit.pas and a demo using this version.

Unfortenatly I could not download the latest JVCL daily package. I always used this link:
http://jvcl.sourceforge.net/daily/ [^]

But all download files seems to be corrupted/empty.

Is there another link or did I miss something?
(0018708)
obones (administrator)
2011-06-09 10:00

No you are right, the machine that creates the daily package is disconnected from the Internet because ADSL is no longer working at my place.
Some moron thought funny to cut the phone lines for the entire building...
(0018917)
obones (administrator)
2011-09-21 11:44

Any news on the patch?
(0019205)
Gerold (reporter)
2011-12-13 11:00

Unfortenatly I can't install JVCL and JCL anymore. Tried latest JVCL and JCL ( jcl-2.4.0.4304.7z 2011-12-13 08:25:58 UTC). Always the same errors on my fresh XP Pro SP3 installation with all updates und Delphi 7 (with or without the updates). Tried so many times, that I getting tired. Very sad.

Installing JVCL: installer says, that JCL is not installed.
Installing JCL: at the end the installer says, "No argument for %d".

When I had some time to investigate the dcc32ex.dpr, it looks to me that there are registry keys for the JCL missing. So JCL is not found by the JVCL installer.

Could not found yet, why JCL shows this error message at the end of the install process.

Installed with and without admin rights. Maybe the SSD is too fast?
(0019206)
Gerold (reporter)
2011-12-13 11:06

I uploaded the screenshots with the error messages.
(0019543)
obones (administrator)
2012-02-24 17:27

This is now added in SVN

- Issue History
Date Modified Username Field Change
2011-06-06 08:55 Gerold New Issue
2011-06-06 08:55 Gerold File Added: Demo.zip
2011-06-07 18:03 obones Status new => acknowledged
2011-06-08 16:21 obones Note Added: 0018689
2011-06-08 16:21 obones Status acknowledged => feedback
2011-06-08 22:31 Gerold File Added: JvRichEditTest.zip
2011-06-08 22:39 Gerold Note Added: 0018703
2011-06-09 10:00 obones Note Added: 0018708
2011-09-21 11:44 obones Note Added: 0018917
2011-12-13 11:00 Gerold Note Added: 0019205
2011-12-13 11:03 Gerold Issue Monitored: Gerold
2011-12-13 11:06 Gerold File Added: JCL Install Bug.JPG
2011-12-13 11:06 Gerold File Added: JVCL Install Bug.JPG
2011-12-13 11:06 Gerold Note Added: 0019206
2012-02-22 14:58 obones Status feedback => acknowledged
2012-02-24 17:27 obones Note Added: 0019543
2012-02-24 17:27 obones Status acknowledged => resolved
2012-02-24 17:27 obones Fixed in Version => Daily / SVN
2012-02-24 17:27 obones Resolution open => fixed
2012-02-24 17:27 obones Assigned To => obones
2012-09-10 14:15 obones Fixed in Version Daily / SVN => 3.46


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker