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
0002898 [JEDI VCL] 00 JVCL Components minor always 2005-04-22 05:20 2005-04-22 06:26
Reporter westphal View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.00
Summary 0002898: TJvHTLabel goes on white background after onmousemove
Description I put a JvHTLabel in my form with html text in, when i move the mouse over it, the background of it turn to white. (I noticed that there is also this kind of problem when the component is set to enabled:=false; but i did not search a correction for it.)

I propose the following correction in jvHTControls:


line:817
procedure TJvCustomHTLabel.MouseMove(Shift: TShiftState; X, Y: Integer);
var
  R: TRect;
  LinkName: string;
begin
  inherited MouseMove(Shift,X,Y);
  //Begin added proposition by EW as IsHyperLink redraw
  Canvas.Font := Font;
  Canvas.Brush.Color := Color;
  if Transparent then
    Canvas.Brush.Style := bsClear
  else
    Canvas.Brush.Style := bsSolid;
  //End added proposition by EW------------
  R := ClientRect;
  case Layout of
    tlTop:
      ;
    tlBottom:
      R.Top := R.Bottom - ItemHTHeight(Canvas, Caption);
    tlCenter:
      R.Top := (R.Bottom - R.Top - ItemHTHeight(Canvas, Caption)) div 2;
  end;
  if IsHyperLink(Canvas, R, Caption, X, Y, LinkName) then
    Cursor := crHandPoint
  else
    Cursor := crDefault;
end;
Additional Information
Tags No tags attached.
Attached Files

- Relationships
has duplicate 0003002resolvedobones TJvHTLabel transparancy issue 

-  Notes
(0007043)
obones (administrator)
2005-04-22 06:17

This is only happening if Transparent is True
(0007044)
obones (administrator)
2005-04-22 06:26
edited on: 2005-04-22 06:28

This is now fixed in CVS, version 1.161.
However, I did not apply your changes, as the problem lied in the HTMLDrawTextEx inside JvJVCLUtils.pas: It was not restoring the brush style of the given canvas.
To solve this, add a variable of type TBrushStyle, called OldBrushStyle and use it to save the value of Canvas.Brush.Style at the beginning and restore it at the end (in the finally clause).


- Issue History
Date Modified Username Field Change
2005-04-22 05:20 westphal New Issue
2005-04-22 06:17 obones Note Added: 0007043
2005-04-22 06:17 obones Status new => confirmed
2005-04-22 06:26 obones Status confirmed => resolved
2005-04-22 06:26 obones Resolution open => fixed
2005-04-22 06:26 obones Assigned To => obones
2005-04-22 06:26 obones Note Added: 0007044
2005-04-22 06:28 obones Note Edited: 0007044
2005-05-28 17:15 obones Relationship added has duplicate 0003002


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