CurrPar property

[Top]  [Chapter] 

Declaration

property CurrPar: IWPParInterface read Get_CurrPar;

Description

This is the interface to manipulate the current paragraph. This is the paragraph the cursor (insertion marker) is located within.

You can use this interface to read the text, to manipulate the text and to change the attributes of the paragraph. To change the attributes of all characters in this paragraph use the interface provided by CurrParAttr. If you only need to change the attribute of certain characters use either CharAttr or SetCharAttr.

 

This interfaces is also provided as IWPMemo.CurrPar.

 

Example:

 

IWPParInterface par = wpdllInt1.CurrPar;

// Clears the paragraph

par.SetText("",0);

// Appends new text using current writing mode

par.AppendText("Hello World",-1);

// activates all borders

par.Borders = 15;

// and shading

par.ParShading = 30;

par.ParColor = wpdllInt1.ToRGB(Color.Blue);

 

TipYou can use paragraph id values in SetPtr to set the current paragraph reference to a different paragraph. See method AppendChild for an example.


[idh_wpdllint_currpar.htm]    Copyright © 2007 by WPCubed GmbH