|
ParCommand Method |
[Top] [Chapter] [Previous] [Next] |
|
Applies to Declaration int ParCommand(int ComID, int param, int param2); Description Execute special commands for this paragraph, cell or table row. ComID = 1: Check wether the paragraph is empty. The result is 1 if it is empty, 0 if it is not, -1 the operation was not possible. if param is 1 white space will be ignored.
param2 is a bitfield to ignore certain object types: 1: merge fields 2: hyperlinks 4: bookmarks 8: text protection codes (reserved) 16: span styles 32: custom codes (reserved) 64: text objects, such as a page number or a symbol object 128: references, used by the table of contents 256: reserved 512: reserved 1024: footnotes 2048: images 4096: horizontal line
ComID = 2: This command reads the row height of the current table row in twips. It can also be used with cell paragraphs. In case there is no table row, the result is -1. param2 is used to enable the examination not only of the current row but of all rows in the current table: 0: return current row height 1: return the smallest row height in the table 2: return the tallest row height in the table 3: return the average row height in the table else return row of all rows (sum)
Unless the complete table is modified the result value is the applied value in twips. In case the complete table is modified the result value is the count of modified rows.
ComID = 3: This command applies the height value "param" to the current row.
param2 is used as a bitfield to control how the value is applied. If param2=0 the minimum height of the current row is changed.
1: Also set maximum height (WPAT_BoxMaxHeight) 2: Do not set minimum height (WPAT_BoxMinHeight) 4: Apply value to all rows in the current table 8: The value "param" is added to the current actual row height is used as input. This can be used to "lock in" the height.
ComID = 4: Work with the paragraph state flags:
param=0 clears the flag, param=1 sets the flag, param=-1 only reads the flag
param2 selects the flag:
0: paragraph is hidden (flag is also used by DeleteParWithCondition ) 1: paragraph is hidden (alternative flag) 2: user flag 1 3: user flag 2 4: user flag 3 5: user flag 4 6: protects tab stops
You need to call ReformatAll to update the screen |