RTF Text Width & Height

  • How can i get the width and Height of an specific RTF or HTML Text?

    I treid following

    Code
    Result.Right    := fWPTLabel.PaintPageWidth[0];
        Result.Bottom   := fWPTLabel.PaintPageHeight[0];
        Result.Right    := fWPTLabel.Memo.Textwidth;
        Result.Bottom   := fWPTLabel.Memo.TextHeight;


    but none of them is the correct size what the RTFLabel need place for the text ...
    I tried several recalculation (DPI 1440 and CurrentXPixelsPerInch) but nothing seems to work.

    Anybode some ideas?

    • Offizieller Beitrag

    TextHeight can be used for the height, the width however is controlled by the page width, the text will stretch.

    You can count the widths of the text in the lines though. If there is demand I can put in a function for this in WPTools 7.