CompletionSet::GetDisplayText Method (Int32, String^, array<Int32>^)
Gets the text and image index to display in the completion list for the specified item.
Assembly: Microsoft.VisualStudio.Package.LanguageService.14.0 (in Microsoft.VisualStudio.Package.LanguageService.14.0.dll)
public: virtual int GetDisplayText( int index, [OutAttribute] String^% text, array<int>^ glyph ) sealed
Parameters
- index
-
Type:
System::Int32
[in] The index of the item for which to get the display text and image.
- text
-
Type:
System::String^
[out] Returns the display text, or null if there is no display text.
- glyph
-
Type:
array<System::Int32>^
[in, out] Returns the index of the image to display, or -1 if no image is to be displayed. This parameter can be null, indicating the caller does not want the image index.
The display text is what is shown in the completion list. The glyph or image is an icon that is typically displayed to the left of the display text and should indicate what type the display text represents. For example, the display text might represent a method, a class variable, a property, or an event handler. In each case a different image would be shown.
This method is an implementation of the GetDisplayText method on the IVsCompletionSet interface.
To retrieve the display text, the base method calls the GetDisplayText method on the Declarations object that was passed to the Init method. The base method also calls the GetGlyph method on the Declarations object if the glyph parameter is not null. The base method always returns a success code of S_OK.