CurrStyle Property

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


IWPParInterface CurrStyle;


This property can be used to manipulate the current style.


The "current style" is the style which has been added last or which was located by function SelectStyle()


Please note that the same interface type is used for styles and for paragraphs. This has to do with the internal implementation of paragraphs which inherit all properties and methods of styles.


When you use a IWPParInterface to manipulate a style the methods which change the text will have no effect. But you can use the properties, i.e. IndentLeft to change the left indent defined by this style.


Of course it is possible to use WPCSS strings to read the properties of a paragraph and assign to a style and vice versa.


VB.NET example:


Memo.CurrStyle.Alignment = 1 '0=lLeft, 1=Center, 2=Right, 3=Justified


Please note that you need to execute ReformatAll(true, true) after you have changed a style.

[idh_iwpmemo_currstyle.htm]    Copyright © 2007 by WPCubed GmbH