■ RichEditControl 클래스에서 문서 범위 인덱스로 선택을 취소하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
using DevExpress.XtraRichEdit; using DevExpress.XtraRichEdit.API.Native; ... private RichEditControl richEditControl; ... Document document = this.richEditControl.Document; ... DocumentRange documentRange1 = document.CreateRange(80 , 100); DocumentRange documentRange2 = document.CreateRange(300, 100); int position = document.Tables[0].Rows[0].LastCell.ContentRange.Start.ToInt(); DocumentRange documentRange3 = document.CreateRange(position, 100); DocumentRange documentRange4 = document.CreateRange(720 , 100); document.Selections.Add ( new List<DocumentRange>() { documentRange1, documentRange2, documentRange3, documentRange4 } ); document.Selections.RemoveAt(0); |