مشاركة عبر


EditPoint.CharLeft أسلوب

نقل الإشارة التحرير الفرعي عدد حرف/ حروف يسار.

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

بناء الجملة

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

المعلمات

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

ملاحظات

CharLeftنقل الإشارة لليسار المشار إليه في التحرير عدد حرف/ حروف. إذا كان بداية مستند هو بلوغ قبل المشار إليه بعدد حرف/ حروف، يظل المؤشر في بداية مستند. في حالة الإشارة التحرير هو في بداية الخط، ثم CharLeftتركه في إنهاء السطر السابق. أن هو، يتم التعامل مع الجميع أحرف السطر الجديد كحرف مفرد.

إذا كانت القيمة Countهو سالبة، ثم CharLeftيقوم بالمثل إلى CharRightالأسلوب.

أمثلة

Sub CharLeftExample()
   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
        
   ' Change the first letter of the fourth word of the fourth line.
   objEditPt.StartOfDocument()
   objEditPt.LineDown(3)
   objEditPt.WordRight(3)
   objEditPt.CharRight(2)
   objEditPt.CharLeft(2)
   objeditpt.Delete(1)
   objEditPt.Insert("p")
End Sub

أمن NET Framework.

راجع أيضًَا

المرجع

EditPoint واجهة

EditPoint الأعضاء

EnvDTE مساحة الاسم