EditPoint2.Cut 메서드 (Object, Boolean)

지정한 텍스트 범위를 클립보드에 복사한 후 문서에서 삭제합니다.

네임스페이스:  EnvDTE80
어셈블리:  EnvDTE80(EnvDTE80.dll)

구문

‘선언
Sub Cut ( _
    PointOrCount As Object, _
    Append As Boolean _
)
void Cut(
    Object PointOrCount,
    bool Append
)
void Cut(
    [InAttribute] Object^ PointOrCount, 
    [InAttribute] bool Append
)
abstract Cut : 
        PointOrCount:Object * 
        Append:bool -> unit 
function Cut(
    PointOrCount : Object, 
    Append : boolean
)

매개 변수

  • Append
    형식: System.Boolean
    선택적 요소.선택한 텍스트를 클립보드에 추가할 것인지 여부를 나타냅니다.기본값은 false입니다.

설명

PointOrCount가 TextPoint 개체이면 Cut은 편집 지점과 PointOrCount 사이의 텍스트를 잘라 클립보드에 붙여넣습니다.PointOrCount가 정수이면 Cut은 편집 지점 뒤의 텍스트를 지정한 문자 수만큼 잘라냅니다. 이때 각 줄의 끝에 암시적 줄 바꿈 시퀀스가 나올 때마다 문자 수가 1씩 증가합니다.PointOrCount가 음수이면 Cut은 편집 지점 앞에서 잘라냅니다.

Append가 true이면 Cut은 현재 클립보드 내용을 바꾸지 않고 그 뒤에 선택 영역을 추가합니다.

예제

Sub CutExample()
   Dim objTextDoc As TextDocument
   Dim objEditPt As EditPoint, iCtr As Integer
        
   ' Create a new text file.
   DTE.ItemOperations.NewFile("General\Text File")
        
   ' Get a handle to the new document and create an EditPoint.
   objTextDoc = DTE.ActiveDocument.Object("TextDocument")
   objEditPt = objTextDoc.StartPoint.CreateEditPoint
       
   ' Insert ten lines of text.
   For iCtr = 1 To 10
      objeditpt.Insert("This is a test." & Chr(13))
   Next iCtr
        
   ' Copies the fourth word of the fourth line, pastes it, 
   ' and then cuts the fourth word of the eighth line.
   objEditPt.StartOfDocument()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.Copy(4)
   objEditPt.Paste()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.Cut(4)
End Sub

.NET Framework 보안

  • 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.

참고 항목

참조

EditPoint2 인터페이스

Cut 오버로드

EnvDTE80 네임스페이스