Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Displays a tip over a span of text when the mouse hovers over this location.
Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
Syntax
'Declaration
Function GetDataTip ( _
pTextLayer As IVsTextLayer, _
ptsSel As TextSpan(), _
<OutAttribute> ptsTip As TextSpan(), _
<OutAttribute> ByRef pbstrText As String _
) As Integer
int GetDataTip(
IVsTextLayer pTextLayer,
TextSpan[] ptsSel,
TextSpan[] ptsTip,
out string pbstrText
)
int GetDataTip(
[InAttribute] IVsTextLayer^ pTextLayer,
[InAttribute] array<TextSpan>^ ptsSel,
[OutAttribute] array<TextSpan>^ ptsTip,
[OutAttribute] String^% pbstrText
)
abstract GetDataTip :
pTextLayer:IVsTextLayer *
ptsSel:TextSpan[] *
ptsTip:TextSpan[] byref *
pbstrText:string byref -> int
function GetDataTip(
pTextLayer : IVsTextLayer,
ptsSel : TextSpan[],
ptsTip : TextSpan[],
pbstrText : String
) : int
Parameters
- pTextLayer
Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextLayer
[in] An IVsTextLayer object representing the text file.
- ptsSel
Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
[in] Span of text relevant to the specified text layer. For more information, see TextSpan.
- ptsTip
Type: array<Microsoft.VisualStudio.TextManager.Interop.TextSpan[]
[out] Returns a span of text to center the tip over. For more information, see Microsoft.VisualStudio.TextManager.Interop.
- pbstrText
Type: System.String%
[out] Returns the text of the tip to display.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From textmgr.idl:
HRESULT IVsLanguageTextOps::GetDataTip(
[in] IVsTextLayer *pTextLayer,
[in] const TextSpan *ptsSel,
[out] TextSpan *ptsTip,
[out, retval] BSTR *pbstrText
);
Use the IVsTextLayer object to access the applicable text within the text span (ptsSel) for the tip.
What is displayed depends on the language service. For example, in Visual C#, holding the cursor over a variable typically shows the type of that variable. This method is also used with when debugging a program: this method is called to obtain the type and name of a variable while the debugger is asked for the value of the variable. The two pieces of information are then combined and displayed in a single data tip.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.