مشاركة عبر


EditPoint.WordRight أسلوب

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

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

بناء الجملة

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

المعلمات

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

ملاحظات

إذا تم الوصول إلى إنهاء مستند قبل Countكلمات، تبقى النقطة في إنهاء مستند.

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

أمثلة

Sub WordRightExample()
   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")
End Sub

أمن NET Framework.

راجع أيضًَا

المرجع

EditPoint واجهة

EditPoint الأعضاء

EnvDTE مساحة الاسم