IWPParInterface Interface

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

Low level paragraph text and attribute access

Description

The IWPParInterface makes it possible to manipulate text styles and paragraphs. If you use it to add text (instead of IWPTextCursor functions) the new text can be creation without the need to move the cursor position. This can be useful to create text "on the fly" in headers or footers (see IWPDataBlock.AppendParagraph).

 

This codes appends text to the paragraph:

 

IWPAttrInterface atr = wpdllInt1.AttrHelper;

IWPParInterface par = memo.CurrPar;

// Append normal text

  atr.Clear();

  par.AppendText("Normal ", atr.CharAttrIndex);

// bold text

  atr.IncludeStyles(1);

  par.AppendText("and bold", atr.CharAttrIndex);

 

IWPParInterface is also used to change the properties of a paragraph:

 

IWPParInterface par= Memo.CurrPar;

par.IndentLeft = (int)(3/2.54*1440); // Indent left = 3 cm

par.IndentRight = (int)(1.5*1440); // Indent right = 1.5 inch

 

Properties:


Methods

 

Methods

 


[idh_interface_iwpparinterface.htm]    Copyright © 2007 by WPCubed GmbH