View Issue Details

IDProjectCategoryView StatusLast Update
0005592JEDI VCL00 JVCL Componentspublic2012-09-10 14:15
ReporterGeroldAssigned Toobones 
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionDaily / GIT 
Target VersionFixed in Version3.46 
Summary0005592: [JvRichEdit] New event and new function to add
DescriptionEvent 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 InformationWould be nice if this could be added so I dont need to change the JvRichEdit.pas anymore after each update.

Thanks in advance
TagsNo tags attached.

Activities

2011-06-06 08:55

 

Demo.zip (490,931 bytes)

obones

2011-06-08 16:21

administrator   ~0018689

Can you provide your changes in a patch file as created by TortoiseSVN?

2011-06-08 22:31

 

JvRichEditTest.zip (439,494 bytes)

Gerold

2011-06-08 22:39

reporter   ~0018703

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?

obones

2011-06-09 10:00

administrator   ~0018708

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...

obones

2011-09-21 11:44

administrator   ~0018917

Any news on the patch?

Gerold

2011-12-13 11:00

reporter   ~0019205

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?

2011-12-13 11:06

 

JCL Install Bug.JPG (116,829 bytes)
JCL Install Bug.JPG (116,829 bytes)

2011-12-13 11:06

 

JVCL Install Bug.JPG (36,646 bytes)
JVCL Install Bug.JPG (36,646 bytes)

Gerold

2011-12-13 11:06

reporter   ~0019206

I uploaded the screenshots with the error messages.

obones

2012-02-24 17:27

administrator   ~0019543

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: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