TypeAndMemberDropdownBars.GetComboAttributes Method

Definition

Returns information about the specified combo box.

public:
 virtual int GetComboAttributes(int combo, [Runtime::InteropServices::Out] System::UInt32 % entries, [Runtime::InteropServices::Out] System::UInt32 % entryType, [Runtime::InteropServices::Out] IntPtr % iList);
public virtual int GetComboAttributes (int combo, out uint entries, out uint entryType, out IntPtr iList);
abstract member GetComboAttributes : int * uint32 * uint32 * nativeint -> int
override this.GetComboAttributes : int * uint32 * uint32 * nativeint -> int
Public Overridable Function GetComboAttributes (combo As Integer, ByRef entries As UInteger, ByRef entryType As UInteger, ByRef iList As IntPtr) As Integer

Parameters

combo
Int32

[in] The ID of the combo box (0 for the types combo box, 1 for the members combo box).

entries
UInt32

[out] The number of entries to be shown on the combo box.

entryType
UInt32

[out] A combination of flags from the DROPDOWNENTRYTYPE enumeration describing the type of entries to appear on the combo box.

iList
IntPtr

nativeint

[out] An unmarshaled handle to an Microsoft.CLRAdmin.IImageList object used for glyphs.

Returns

If successful, returns S_OK; otherwise, returns an error code.

Implements

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.

Applies to