Skip to main content

RichEditControl.Cut() Method

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

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v24.1.dll

NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.RichEdit, DevExpress.Win.TreeMap


public void Cut()


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.

View Example

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];

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


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