RichEditControl.Cut() Method
Removes the selection from the document, and places it on the Clipboard.
Namespace: DevExpress.XtraRichEdit
Assembly: DevExpress.XtraRichEdit.v22.2.dll
NuGet Package: DevExpress.Win.RichEdit
Declaration
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();
}
}
See Also