Manage Style Properties

Top  Previous  Next

Most paragraph properties are managed by the functions which are introduced by the TWPTextStyle class.

 

Please note the inheritance chart of the TParagraph class:

clip0001

Note: The RTF engine also provides powerful interfaces to manipulate the paragraph and/or character attributes of the current text or the selected text. Both interfaces are part of the TWPRTFDataCursor.

 

The attributes of the TWPTextStyle/TParagraph objects are managed by the 'A' methods. Most important is the function AGet which reads a value.

This method TWPTextStyle.AGet(WPAT_code : Integer; var Value : Integer) is a function which returns a boolean value. The return code is false if the property with the ID WPAT_code was not defined. In this case the variable "Value" will not be modified! Please make sure you initialized the variable Value!

 

Hint: Usually when the complete text is selected and the selection is deleted, the attributes and style assignment are removed, too. This behavior can be disabled using the EditOptionEx2 wpClearSelectionDontRemoveParAttr