View Issue Details

IDProjectCategoryView StatusLast Update
0002898JEDI VCL00 JVCL Componentspublic2005-04-22 06:26
ReporterwestphalAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.10 
Summary0002898: TJvHTLabel goes on white background after onmousemove
DescriptionI 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;
TagsNo tags attached.

Relationships

has duplicate 0003002 resolvedobones TJvHTLabel transparancy issue 

Activities

obones

2005-04-22 06:17

administrator   ~0007043

This is only happening if Transparent is True

obones

2005-04-22 06:26

administrator   ~0007044

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