Low level move Methods
|[Top] [Chapter] [Previous] [Next]|
If you want to change the properties of the text using low level code you can use this methods to move to the next, previous, child or parent paragraph. In all cases the respective function returns false if the paragraph cannot be located.
The text is arranged in memory similar to objects in HTML code. Simple text does not use nesting, the paragraphs are siblings:
Tables use nesting. The table is the parent paragraph, it contains children which are rows. The rows have children which represents the cells. Cells may have children if they contain more than one paragraph. (The cell paragraph currently can also contain text. This helps to reduce the memory consumption of large tables)
<td>Cell 3 - line one
<p>Cell 3 line 2</p>
<p>Cell 3 line 3</p>
a) Please also see SetPtr which supports some constants to select the parent table or row.
b) Memo.CurrPar.Select..() will change the cursor position but Memo.ActiveText.CurrPar.Select...() will not change it!
TextDynamic 7 and RTF2PDF 4: The "Ptr" methods now require the paragraph ID to be IntPtr to make the API compatible to 64 bit.
bool SelectNextPar(bool ChildrenToo);
Select the next sibling. If the parameter is true it will also move inside of the object tree.
bool SelectNextParGlobal(bool ChildrenToo);
Select the next sibling. If the parameter is true it will also move inside of the object tree. In contrast to SelectNextPar this method will move to the next RTFDataBlock if the current was the last object.
bool SelectPrevPar(bool ParentToo);
Select the previous sibling. If the parameter is true it will also move one level higher.
Select the child paragraph - if there is one, otherwise the result is false.
Select the parent paragraph - if there is one, otherwise the result is false.
Select the first paragraph in the current level. This can be used to select the first row in a table or the first cell in a row.
Select the last paragraph in the current level. This can be used to select the last row in a table or the last cell in a row.
bool SelectSiblingNr(int n)
Select the n-th paragraph in the current level - if there is one, otherwise the result is false.
Calculates the sibling number.
Calculates the number of siblings in this level. This can be the number of rows or the number of cells.