View Issue Details

IDProjectCategoryView StatusLast Update
0001699JEDI VCL00 JVCL Componentspublic2004-04-30 07:45
ReporterDierkAssigned Touser72 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001699: JVLabel now again Bug 0001455
DescriptionSince version 1.30, Thu Apr 15 08:33:52 2004 UTC,
JVLabel has same Bug reported in 0001455

Regards

Dierk
TagsNo tags attached.

Activities

user72

2004-04-26 05:29

  ~0004077

This is probably caused by 0001656. Try adding the following to the end of procedure TJvCustomLabel.Paint:

...
    if Angle = 0.0 then
      AdjustBounds;
  end;
end;

Please test using different values of Angle, WordWrap, Layout and Alignment both at design and run time and with and without images assigned.

Dierk

2004-04-27 07:08

reporter   ~0004093

Peter,
I´ve tested the following lines at the end of paint routine.
===========================
    if Angle = 0.0 then
      AdjustBounds;
===========================
Now it works fine to me, too. I also tested several values of properties like angle, wordwrap.... ect. in design and runtime.

Btw. There is an additional tweak: Set Angle >0 and Autosize = false, you can´t see anything from label. (... but I don´t need this)

user72

2004-04-27 10:28

  ~0004094

OK, thanks for reporting this. I will look into the Angle/AutoSize issue

user72

2004-04-28 14:31

  ~0004119

The Angle/AUtosize problem is caused by Rect not being set in Paint, so change .Paint like this (changes in bold):

...
Rect := ClientRect;
    if Angle <> 0 then
      DrawAngleText(Rect, DT_EXPANDTABS or DT_WORDBREAK or Alignments[Alignment])
    else
    begin
// Rect := ClientRect;
      Inc(Rect.Left, FLeftMargin);
      Dec(Rect.Right, FRightMargin);

Dierk

2004-04-29 03:50

reporter   ~0004121

Yep, now it works, too.

But another tweak is when autosize is set to true and then the angle is changing, there have to be an additional adjustbounds like in VisualCLX.

procedure TJvCustomLabel.SetAngle(Value: TJvLabelRotateAngle);
begin
  if FAngle <> Value then
  begin
    FAngle := Value;
    {*$IFDEF VisualCLX}
    FNeedsResize := Autosize;
    AdjustBounds;
    {*$ENDIF VisualCLX}
    Invalidate;
  end;
end;

BTW: ....and if angle is set, no shadowtext is drawn... (... but I don´t need this)

user72

2004-04-29 04:23

  ~0004124

SetAngle issue committed to CVS. Looking at ShadowText...

user72

2004-04-29 05:09

  ~0004125

OK, think I've got a solution for angled shadow as well. Committing to CVS

Dierk

2004-04-29 12:27

reporter   ~0004131

Nice... but one little additional bug is there now... :)

But inc and dec by shadowsize instead of 1

      case ShadowPos of
        spLeftTop:
        begin
          Dec(ShadowX, ShadowSize);
          Dec(ShadowY, ShadowSize);
        end;
        spRightBottom:
        begin
          Inc(ShadowX, ShadowSize);
          Inc(ShadowY, ShadowSize);
        end;
        spLeftBottom:
        begin
          Dec(ShadowX, ShadowSize);
          Inc(ShadowY, ShadowSize);
        end;
        spRightTop:
        begin
          Inc(ShadowX, ShadowSize);
          Dec(ShadowY, ShadowSize);
        end;
      end;

user72

2004-04-29 13:57

  ~0004132

Duh! Stupid mistake. Fixed

user72

2004-04-30 04:26

  ~0004140

So, are we happy yet? Can I close this issue?

anonymous

2004-04-30 05:18

viewer   ~0004142

Oh, Peter I´m really happy :)

Wonderful weather and wonderful JVLabel.
Now you can close this issue.

user72

2004-04-30 07:45

  ~0004143

Nice weather here too, but a bit windy. Closing up (to the next time<g>).

Issue History

Date Modified Username Field Change
2004-04-26 02:27 Dierk New Issue
2004-04-26 05:29 user72 Note Added: 0004077
2004-04-26 05:29 user72 Status new => feedback
2004-04-27 07:08 Dierk Note Added: 0004093
2004-04-27 10:28 user72 Note Added: 0004094
2004-04-28 14:31 user72 Note Added: 0004119
2004-04-29 03:50 Dierk Note Added: 0004121
2004-04-29 04:23 user72 Note Added: 0004124
2004-04-29 05:09 user72 Note Added: 0004125
2004-04-29 12:27 Dierk Note Added: 0004131
2004-04-29 13:57 user72 Note Added: 0004132
2004-04-30 04:26 user72 Note Added: 0004140
2004-04-30 05:18 anonymous Note Added: 0004142
2004-04-30 07:45 user72 Status feedback => resolved
2004-04-30 07:45 user72 Resolution open => fixed
2004-04-30 07:45 user72 Assigned To => user72
2004-04-30 07:45 user72 Note Added: 0004143