Paragraphstyle Support Category

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

Interfaces, Properties and Methods to use Paragraphstyles

Description

Paragraphstyles are very useful to give your documents a uniform look. Instead of applying the attributes font size=12, underlined to each paragraph which contains a headline, you can simply attach the style "headline" to that paragraph. The style headline is defined separately and may be modified any time. After the modification (and a "ReformatAll" of the text) the new style will be displayed.

 

In general, when you attach a style the original attributes of neither the paragraph nor the characters will be changed, there is simply a new set of default attributes which is valid only for this paragraph. When the engine is formatting the text the default attributes are overruled by the attributes defined in the paragraph itself and the character attributes. So, to make sure that all attributes defined in a style are actually used, the attributes must not be used by the paragraph or characters.

(Note: The same logic is used by HTML/CSS - Attributes can be defined on a style, paragraph and character basis)

 

The method which assigns a style to a paragraph will automatically remove all attributes from the paragraph and the characters which would hide (overrule) the attributes defined in that style.

 

Properties

 

also see:

IWPParInterface.ParStrCommand


Methods

Memo.LoadNumberStyles

Memo.SaveNumberStyles

Memo.LoadStyleSheet

Memo.SaveStyleSheet

 

Command ID 28/29/30/31 - Save the paragraph styles into a file or string

 

Also see SetXMLSchema and "Paragraph Styles".

 

GUI:

In the XML layout description in the PCC file this line will display a combo box with paragraph styles:

    <dropdownlist width="150" Image="-1" text="" wpa="ParStyleSelection"/>

 

style_combo

WPA Actions:

 

DiaOneStyle - edit one style

 

clip0193

 

DiaStyleSheet - edit all styles

 

clip0192

 

ParStyleSelection

 

- select the paragraph style list in the toolbar (see example above)


[idh_cat_stylesheets.htm]    Copyright © 2007 by WPCubed GmbH