Skip to main content
A newer version of this page is available. .

RichEditControl.Cut() Method

Removes the selection from the document, and places it on the Clipboard.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v19.1.dll

Declaration

public void Cut()

Example

The following code finds all occurrences of the “Custom Action” phrase using the SubDocument.FindAll method, selects and cuts them.

The RichEditControl instance is passed to the BarItem.ItemClick event handler using the BarItem.Tag property.

static void buttonCustomAction_ItemClick_Cut(object sender, ItemClickEventArgs e) {
    RichEditControl richEdit = e.Item.Tag as RichEditControl;
    DocumentRange[] foundRanges = richEdit.Document.FindAll("Custom Action", SearchOptions.None);
    for(int i = 0; i < foundRanges.Length; i++) {
        richEdit.Document.Selection = foundRanges[i];
        richEdit.Cut();
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Cut() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also