InputSection Method |
[Top] [Chapter] [Previous] [Next] |
Applies to Declaration IWPPageSize InputSection(int Mode); Description Creates a new section in the text or locates it for modification.
It returns a reference to the section reference. You need to call ReleaseInt for the returned interface!
Parameter Mode:
a) The value -1 will locate the section which is valid at the current position (may be started in any paragraph before). In this case the result value can be null! You can use IWPPageSize.GetProp(0) to red the section id of this section. This id can be then used in Memo.BlockAdd to create a header or footer for a specific section.
b) Bitfield: If bit 2 is set a new paragraph is added after a table. Bit 1 sets a page break.
Example: // a) Create IWPPageSize sect; sect = wpdllInt1.TextCursor.InputSection(1); sect.Landscape = true; wpdllInt1.ReleaseInt(sect);
// b) Modify IWPPageSize sect; sect = wpdllInt1.TextCursor.InputSection(-1); if (sect!=null) { sect.Landscape = true; wpdllInt1.ReleaseInt(sect); }
Note: the select flag (use SetProp/GetProp) to set and read it will be automatically set when a property is changed. Returns Reference to IWPPageSize interface to modify the page size used by this section. |