|[Top] [Chapter] [Previous] [Next]|
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.
When You are done and want the editor to be updated, please execute Memo.TextCommand 18, 0, 0
Important: The interfaces CurrPar and CurrParAttr always access the current cell/paragraph - they cannot be used to edit a cell/paragraph which lost focus.
IWPParInterface par = wpdllInt1.CurrPar;
// Clears the paragraph
// Appends new text using current writing mode
// activates all borders
par.Borders = 15;
// and shading
par.ParShading = 30;
par.ParColor = wpdllInt1.ToRGB(Color.Blue);
Dim memo As IWPMemo
Set memo = ActiveForm.rtfText.memo
Dim currpar As IWPParInterface
Set currpar = memo.currpar
Select Case Button.Key
Case "Left Aligned"
currpar.Alignment = 0
memo.Reformat 'Reformat when Idle
currpar.Alignment = 1
Case "Right Aligned"
currpar.Alignment = 2