مشاركة عبر


EditPoint.WordLeft أسلوب

نقل الكائن عدد معين من الكلمات إلى اليمين.

مساحة الاسم:  EnvDTE
التجميع:  EnvDTE (في EnvDTE.dll)

بناء الجملة

'إقرار
Sub WordLeft ( _
    Count As Integer _
)
void WordLeft(
    int Count
)
void WordLeft(
    [InAttribute] int Count
)
abstract WordLeft : 
        Count:int -> unit 
function WordLeft(
    Count : int
)

المعلمات

  • Count
    النوع: System.Int32
    اختياري.تعين عدد الكلمات إلى تحريك نقطة التحرير إلى يسار موضعه الحالي في احتياطي.

ملاحظات

WordLeftنقل نقطة تحرير إلى اليمين المشار إليه بعدد الكلمات. إذا كان بداية مستند هو بلوغ قبل Countكلمات، تبقى النقطة في بداية مستند.

إذا كانت وسيطة هو سالبة، ثم WordLeftيقوم بشكل مماثل ل WordRight.

أمثلة

Sub WordLeftExample()
   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
       
   ' Replace the eighth word on the third line with a new word.
   objEditPt.StartOfDocument()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.Delete(4)
   objEditPt.Insert("raid")
   objEditPt.WordLeft(3)
End Sub

أمن NET Framework.

راجع أيضًَا

المرجع

EditPoint واجهة

EditPoint الأعضاء

EnvDTE مساحة الاسم