EditPoint2.ReadOnly – metoda (Object)
Vrátí hodnotu určující, zda některá zadaná oblast obsahuje text pouze pro čtení.
Obor názvů: EnvDTE80
Sestavení: EnvDTE80 (v EnvDTE80.dll)
Syntaxe
'Deklarace
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
Parametry
- PointOrCount
Typ: System.Object
Povinné.Buď TextPoint objektu nebo počet znaků.
Vrácená hodnota
Typ: System.Boolean
true Pokud výběr obsahuje text pouze pro čtení. jinak false.
Poznámky
Celý dokument je označen jako takové nebo znak je součástí pouze pro čtení bloku znak může být jen pro čtení.
Příklady
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
Zabezpečení rozhraní .NET Framework
- Plná důvěra přímému volajícímu. Částečně zabezpečený kód nemůže tento člen použít. Další informace naleznete v tématu Používání knihoven z částečně důvěryhodného kódu.