wp6 - preview dialog not landscape, but was in wp4

  • I'm previewing a one page document. I setup a twprichtext instance (below), and assign it to the editbox property. In wp4, it displayed as landscape, as intended, but in wp6 it doesn't.


    • Offizieller Beitrag

    Hi,

    first - please do not use dynamic TWPRichText, use TWPCustomRTFEdits instead which were created with the constructor CreateDynamic. The difference is, the instance TWPCustomRTFEdit.CreateDynamic *knows* that is a dynamic control, that it does not have a window handle. It creates a reference DC differently which makes it able to print. The TWPRichText was designed as an editor and waits for Idle time to do a reformat of the text.

    The tparprops are obsolete. Please rewrite the code which is using it. You can use InputString, or AciveText.AppendParagraph. Please read about TParagraph in the manual - it is the object which replaces the paragraph record used by WPTools 4 and earlier.

    RT.Header.PageSize := wp_Letter sets all page information. You should better access PageWidth and PageHeight.

    Julian