Applies to
Declaration
function CollapseBlock(ParNumber: Integer; Level: Integer): Boolean;
Description
This method collapses the block at a given paragraph specified by parameter ParNumber, if that paragraph is inside a collapsible block at a level greater or equal to parameter Level. It does nothing if the paragraph in question is not inside a collapsible block nested up to Level.
The function result returns True if some collapsing occured, False otherwise. Reasons for no collapsing to occur are
- The paragraph in question is not located inside a collapsible block that is at least Level in nesting;
- The specified block level is already collapsed;
- Property WordWrap is True, or Alignment is different from taLeftJustify (the current version cannot collapse blocks in these circumstances).
See also
Method GetBlocksStates
Method ExpandBlock
Topic Collapsible blocks in PlusMemo
TpmCollapsibleHandler component