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

Checking actual height of Stetchables

edited April 2005 in General
Hi

This sounds elementary and probably is but.. ..how do I get at the actual
printed height of a stretchable component at run-time.

I'm trying to set the height of a box based on the actual printed height of
a ppShape containing a memo, but the 'Height' property only returns the
original 'design height'.

Any help much appreciated.

Rob Dabbs
R & A Software (UK)

ps Is there anywhere I should be looking to find the answer to a question
like the above!

Comments

  • edited April 2005
    Hi Rob,

    Try using the OnDrawCommandCreate event to determine the actual height of an
    object. For instance if you have a memo object, you could do the
    following...

    using
    ppDrwCmd,
    ppUtils,
    ppTypes;

    procedure TForm1.ppMemo1DrawCommandCreate(Sender, aDrawCommand: TObject);
    var
    liMMHeight: Integer; //Microns
    ldHeight: Double; //Inches
    begin

    liMMHeight := TppDrawText(aDrawCommand).Height;

    ldHeight := ppFromMMThousandths(liMMHeight, utInches, pprtVertical, nil);

    ShowMessage('Memo1 is ' + FloatToStr(ldHeight) + ' inches tall.');

    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2005
    Looks like that's what I need Nico!..
    Many thanks

    Rob


This discussion has been closed.