IWPPageSize Interface

[Top]  [Chapter]  [Previous]  [Next]

Interface to update Pagesize

Description

This interface is used to change the width and height of the page. All integer properties use twips. One twip is 1/1440 of an inch. If you work with centimeters, you can use this formula to convert centimeter into twips:

1 twip = 1 cm * 2.54 / 1440.

 

While mailing label print and preview is activated (see Memo.LabelDef) the page size defined using PageSize or in the OnMeasurePage is overridden.

 

The editor can be switched into the WordWrap mode - then the text is formatted to exactly fit into the window horizontally.

 

To make the current page size the default for new documents call "MakeDefault" or the method Memo.TextCommandStr(19,0,"");

 

wpdllInt1.Memo.TextCommandStr(19, 0, "");

 

 

Tip: To create a new section in the text you can use IWPTextCursor.InputSection. To select the current section use InputSection(-1).

 

IWPPageSize sect;

sect = wpdllInt1.TextCursor.InputSection(1);

sect.Landscape = true

wpdllInt1.ReleaseInt(sect);

 

Using GetProp(0) the section ID can be retrieved. This ID can be used in Memo.BlockAdd as last parameter to create a header/footer for a certain section.

 

Note: The select flag (use SetProp to set it and GetProp to read it) will be automatically set when a property is changed.

 

Properties


Methods

 

PAR-MAXLENGTH-Tip: You can use the method Memo.TextCommand(4,N,0) to specify that a maximum of N characters should be printed in one line.

 

 


[idh_interface_iwppagesize.htm]    Copyright © 2007 by WPCubed GmbH