View Issue Details

IDProjectCategoryView StatusLast Update
0002940JEDI VCL00 JVCL Componentspublic2005-05-09 03:08
ReportermessenjahAssigned ToAHUser 
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0002940: HTMLDrawTextEx in jvJVCLUTILS does not always render hyperlink red.
DescriptionSometimes when I go over a hyperlink in jvHTLabel, it does not turn red.
the problem is in HTMLDrawTextEx in jvJVCLUTILS

Around line 7222 there is a statement like:
if (MouseY in [])

The problem is that [R.Top..R.Top+height] (and [R.lef..R.Left.Width]) never return true is the range starts > 255.
This is a compiler bug (I am using D7). It should either work, Or give a warning.

In the mean time i fixed it by replacing it with this:

      Height := CanvasMaxTextHeight(Canvas);
      if IsLink and not MouseOnLink then
        if (MouseY>=R.Top) and (MouseY <= R.Top + Height) then
        if (mouseX >= R.Left) and (MouseX <=R.Left + Width) then
          MouseOnLink := True;
Additional InformationTo see the problem, use this simple program:

procedure TForm1.Button1Click(Sender: TObject);
  X, Y, Z : Integer;
  z := 255;
  if Z in [x..y] then memo1.Lines.Add('true 1');

  z := 256;
  if Z in [x..y] then memo1.Lines.Add('true 2')

This should output:"
true 1
true 2

but it only outputs:"
true 1

Well atleast in my Delphi 7.
TagsNo tags attached.



2005-05-09 03:08

developer   ~0007118

Thanks for reporting this.
Fixed in CVS.

Issue History

Date Modified Username Field Change
2005-05-08 09:51 messenjah New Issue
2005-05-09 03:08 AHUser Status new => resolved
2005-05-09 03:08 AHUser Resolution open => fixed
2005-05-09 03:08 AHUser Assigned To => AHUser
2005-05-09 03:08 AHUser Note Added: 0007118