مشاركة عبر


EditPoint2.ReadOnly أسلوب (Object)

إرجاع a القيمة indicating whether أي of the specified range يحتوي على read-فقط نص.

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

بناء الجملة

'إقرار
Function ReadOnly ( _
    PointOrCount As Object _
) As Boolean
bool ReadOnly(
    Object PointOrCount
)
bool ReadOnly(
    [InAttribute] Object^ PointOrCount
)
abstract ReadOnly : 
        PointOrCount:Object -> bool 
function ReadOnly(
    PointOrCount : Object
) : boolean

المعلمات

  • PointOrCount
    النوع: System.Object
    مطلوبة.أما على TextPointالكائن أو عدد حرف/ حروف.

القيمة المُرجعة

النوع: System.Boolean
trueإذا احتوى تحديد على نص للقراءة فقط؛ وإلا،false.

التطبيقات

EditPoint.ReadOnly(Object)

ملاحظات

يمكن قراءة حرف-فقط إذا كان مستند بأكمله هو وضع علامة عليها، أو إذا كان الحرف هو الموجودة في حظر للقراءة فقط.

أمثلة

Sub ReadOnlyExample()
   Dim objTextDoc As TextDocument
   Dim objMovePt As EditPoint
   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
   objMovePt = objTextDoc.EndPoint.CreateEditPoint
        
   ' Insert ten lines of text.
   For iCtr = 1 To 10
      objEditPt.Insert("This is a test." & Chr(13))
   Next iCtr
   ' Move the active point to where the second edit point is
   ' and then insert some text.
   MsgBox("Is text read-only? " & objEditPt.ReadOnly(5))
End Sub

أمن NET Framework.

راجع أيضًَا

المرجع

EditPoint2 واجهة

EditPoint2 الأعضاء

ReadOnly التحميل الزائد

EnvDTE80 مساحة الاسم