View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002940 | JEDI VCL | 00 JVCL Components | public | 2005-05-08 09:51 | 2005-05-09 03:08 |
Reporter | messenjah | Assigned To | AHUser | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | 3.10 | |||
Summary | 0002940: HTMLDrawTextEx in jvJVCLUTILS does not always render hyperlink red. | ||||
Description | Sometimes 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 [R.Top..R.top+Height]) 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 begin MouseOnLink := True; | ||||
Additional Information | To see the problem, use this simple program: procedure TForm1.Button1Click(Sender: TObject); var X, Y, Z : Integer; begin X:=254; Y:=255; z := 255; if Z in [x..y] then memo1.Lines.Add('true 1'); X:=255; Y:=256; z := 256; if Z in [x..y] then memo1.Lines.Add('true 2') end; This should output:" true 1 true 2 " but it only outputs:" true 1 " Well atleast in my Delphi 7. | ||||
Tags | No tags attached. | ||||