Bagikan melalui


TypeAndMemberDropdownBars.GetComboAttributes Method

Returns information about the specified combo box.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)
  Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)

Syntax

'Declaration
Public Overridable Function GetComboAttributes ( _
    combo As Integer, _
    <OutAttribute> ByRef entries As UInteger, _
    <OutAttribute> ByRef entryType As UInteger, _
    <OutAttribute> ByRef iList As IntPtr _
) As Integer
public virtual int GetComboAttributes(
    int combo,
    out uint entries,
    out uint entryType,
    out IntPtr iList
)
public:
virtual int GetComboAttributes(
    int combo, 
    [OutAttribute] unsigned int% entries, 
    [OutAttribute] unsigned int% entryType, 
    [OutAttribute] IntPtr% iList
)
abstract GetComboAttributes : 
        combo:int * 
        entries:uint32 byref * 
        entryType:uint32 byref * 
        iList:IntPtr byref -> int 
override GetComboAttributes : 
        combo:int * 
        entries:uint32 byref * 
        entryType:uint32 byref * 
        iList:IntPtr byref -> int 
public function GetComboAttributes(
    combo : int, 
    entries : uint, 
    entryType : uint, 
    iList : IntPtr
) : int

Parameters

  • combo
    Type: System.Int32
    [in] The ID of the combo box (0 for the types combo box, 1 for the members combo box).
  • entries
    Type: System.UInt32%
    [out] The number of entries to be shown on the combo box.
  • entryType
    Type: System.UInt32%
    [out] A combination of flags from the DROPDOWNENTRYTYPE enumeration describing the type of entries to appear on the combo box.
  • iList
    Type: System.IntPtr%
    [out] An unmarshaled handle to an IImageList object used for glyphs.

Return Value

Type: System.Int32
If successful, returns S_OK; otherwise, returns an error code.

Implements

IVsDropdownBarClient.GetComboAttributes(Int32, UInt32%, UInt32%, IntPtr%)

Remarks

This method provides basic information about what is to be displayed in the specified combo box. The base method indicates that each entry contains text, can have font attributes set when the text is displayed, and has a glyph associated with it. If you need other attributes than this, you must override this method and provide the appropriate DROPDOWNENTRYTYPE flags.

The bar ID is actually an index into the number of combo boxes that appear on the view. For the TypeAndMemberDropdownBars class, this ID will be 0 for the types list and 1 for the members list.

This method is an implementation of the GetComboAttributes method on the IVsDropdownBarClient interface.

The base method returns the following:

  • The number of entries in the appropriate internal list.

  • A combination of the flags indicating each entry has text, a font attribute, and an image.

  • The handle of the image list as obtained from the GetImageList method in the LanguageService class.

Note

The image list as obtained from the GetImageList method is cached in the TypeAndMemberDropdownBars class so subsequent calls to this method returns the cached image list. This is normally not a problem unless GetImageList can return different image lists for different contexts.

.NET Framework Security

See Also

Reference

TypeAndMemberDropdownBars Class

Microsoft.VisualStudio.Package Namespace