Jaa


ITextDocument.BeginUndoGroup Method

Definition

Turns on undo grouping.

public:
 void BeginUndoGroup();
void BeginUndoGroup();
public void BeginUndoGroup();
function beginUndoGroup()
Public Sub BeginUndoGroup ()

Remarks

An undo group collects undo anti-events for editing changes even when additional undo groups would normally be created. For example, typing anti-events are normally grouped into a single undo group that can be undone with a single Ctrl+Z key combination. A paste or change in insertion point terminates the current undo group and starts another. After you call BeginUndoGroup, such terminations do not occur; only one undo group is used until you call the EndUndoGroup method. The entire group is undone by a single Ctrl+Z key combination.

When undo grouping is on:

  • The undo manager adds undo anti-events for text changes to the current undo group.
  • A single undo command executes all of the undo anti-events in the undo group. This restores the text state to the one that was active when undo grouping was turned on.

Applies to

See also