View Issue Details

IDProjectCategoryView StatusLast Update
0001455JEDI VCL00 JVCL Componentspublic2004-04-22 02:56
ReporteranonymousAssigned Touser72 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001455: Incorrect painting of TJVLabel when resized
DescriptionIncorrect painting of TJVLabel when resized on autosize=true
Could be solved with calling "AdjustBounds" at end of paint procedure.. (Same like in JVCL 2)

procedure TJvCustomLabel.Paint;
var
  Rect: TRect;
  DrawStyle: Integer;
begin
   .....
   .....
    if FShowFocus and Assigned(FFocusControl) and FFocused and
      not (csDesigning in ComponentState) then
    begin
      InflateRect(Rect, 1, 0);
      Brush.Color := Self.Color;
      DrawFocusRect(Rect);
    end;
    AdjustBounds; // <--- Autosize don´t work without
  end;
end;

Best regards

Dierk
TagsNo tags attached.

Activities

user72

2004-03-09 01:38

  ~0003270

Have you tested the proposed change with WordWrap = true and AutoSize = true? IIRC, there were problems with AdjustBounds so that's why it was removed, but I could be wrong...

Besides, I think the problem is only apparent when you drop the label on a form, isn't it? Toggling AutoSize off/on will fix it, IIRC.

anonymous

2004-03-09 01:56

viewer   ~0003271

I have tried all the possibilities in JVCL2.1.
Now it´s the same problem in JVCL3.

You´re right. The problem is only apparent on dropping the label to form, using the label on normal purpose.
In my programm I have to resize the whole form with all components on it in proportion. Therefore this occurs maybe only in my application. :)

BTW: Never had problems with this AdjustBounds

Regards

Dierk

user72

2004-03-09 02:20

  ~0003275

I just tested. You're right: it works with both WordWrap and AutoSize in any combination. I'll fix it in CVS. Thanks

Issue History

Date Modified Username Field Change
2004-03-09 01:21 anonymous New Issue
2004-03-09 01:38 user72 Note Added: 0003270
2004-03-09 01:38 user72 Status new => feedback
2004-03-09 01:56 anonymous Note Added: 0003271
2004-03-09 02:20 user72 Status feedback => resolved
2004-03-09 02:20 user72 Resolution open => fixed
2004-03-09 02:20 user72 Assigned To => user72
2004-03-09 02:20 user72 Note Added: 0003275
2004-04-22 02:56 user72 Status resolved => closed