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

re: How to obtain TppMemo Height after assigned with TStringList?

edited November 2004 in General
Hi

I have encounter this but not sure if this is a bug.

I did the following in sequence:-
1. Assign StringList to TppMemo control
2. Check TppMemo.Height but the value remains the same. TppMemo.Stretch is
set to true.

I am using RB 7.03. Please advise.

Best regards
Raymond

Comments

  • edited November 2004
    I am sorry. Forgot to state my question.

    Before assign StringList to TppMemo the height property is 0.15333. After
    assign StringList tp TppMemo.Lines "height" property is still having same
    value. How can I obtain new "height" value?


  • edited November 2004
    Hi Raymond,

    The height of the actual component will remain the same regardless if it
    stretches or not. If you need to find the height of the stretched component
    you will need to look at the height of the actual draw command that is drawn
    to the device canvas. This can be done inside the OnDrawCommandCreate
    event. Note that this measurement will be in microns so the proper
    conversions will need to be made. See the ppFromMMThousandths method
    located in the ppUtils.pas file.


    uses
    ppDrwCmd;

    procedure TForm1.ppMemo1DrawCommandCreate(Sender, aDrawCommand: TObject);
    begin
    FMemoHeight := TppDrawText(aDrawCommand).Height;
    end;

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.