Checking actual height of Stetchables
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!
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!
This discussion has been closed.
Comments
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
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Many thanks
Rob