Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

URGENT ....Angled Label Not saving in Archive

edited November 2001 in General
Hi all

I am using the Builder controls Angled Label (Cooldev), and it works fine,
until I save the report to an archive and try and read it back. Then all the
labels are horizontal again.

I have already written to Cooldev and after 5 days, have still not had a
response.

Can anyone else out there help me please. This is URGENT!!!....


Thanks to all..

Comments

  • edited November 2001
    The author of the rotated label didn't realize that the draw command was
    streamable to archive, as the properties need to be published for this to
    work. This is what the draw command definition should look like in
    BuilderControls.pas:

    {TDrawRotatedText}
    TDrawRotatedText = class(TppDrawText)
    private
    FAngle: Cardinal;
    FOrigin: TPoint;

    function CalcRect(ACanvas: TCanvas; MaxWidth: Integer; const AText:
    string): TRect;
    function CalcClientRect(Canvas: TCanvas; Angle: Integer; ARect: TRect;
    var APoint: TPoint): TRect;

    public
    constructor Create(aOwner: TComponent); override;
    destructor Destroy; override;

    procedure Assign(Source: TPersistent); override;
    function Draw(aDevice: TppDevice): Boolean; override;

    published
    property Angle: Cardinal read FAngle write FAngle default 0;
    property Origin: TPoint read FOrigin write FOrigin;
    end;

    You can add the published keyword and reinstall the package into Delphi and
    you should be good to go.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.