Udostępnij za pośrednictwem


IVsTaskList2.SelectItems(Int32, IVsTaskItem[], UInt32, UInt32) Method

Definition

Selects zero or more items. Pass in zero for nItems to remove the selection entirely. All non-filtered items in pItems will be selected and the last one will become the caret item. Filtered items are ignored.

public:
 int SelectItems(int nItems, cli::array <Microsoft::VisualStudio::Shell::Interop::IVsTaskItem ^> ^ pItems, System::UInt32 tsfSelType, System::UInt32 tsspScrollPos);
public:
 int SelectItems(int nItems, Platform::Array <Microsoft::VisualStudio::Shell::Interop::IVsTaskItem ^> ^ pItems, unsigned int tsfSelType, unsigned int tsspScrollPos);
int SelectItems(int nItems, std::Array <Microsoft::VisualStudio::Shell::Interop::IVsTaskItem const &> const & pItems, unsigned int tsfSelType, unsigned int tsspScrollPos);
public int SelectItems (int nItems, Microsoft.VisualStudio.Shell.Interop.IVsTaskItem[] pItems, uint tsfSelType, uint tsspScrollPos);
abstract member SelectItems : int * Microsoft.VisualStudio.Shell.Interop.IVsTaskItem[] * uint32 * uint32 -> int
Public Function SelectItems (nItems As Integer, pItems As IVsTaskItem(), tsfSelType As UInteger, tsspScrollPos As UInteger) As Integer

Parameters

nItems
Int32

[in] Integer value containing Zero or the number of items selected. Set to zero to remove the selection entirely.

pItems
IVsTaskItem[]

[in] An array of IVsTaskList objects.

tsfSelType
UInt32

[in] An object of __VSTASKLISTSELECTIONTYPE type.

tsspScrollPos
UInt32

[in] An object of __VSTASKLISTSELECTIONSCROLLPOS type.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

In order to handle commands, the task providers will need to know which tasks are currently selected.

All non-filtered items in pItems will be selected and the last one will become the caret item. Filtered items are ignored

COM Signature

From vsshell80.idl:

HRESULT SelectItems(  
   [in] int nItems,   
   [in, size_is(nItems)] IVsTaskItem* pItems[],   
   [in] VSTASKLISTSELECTIONTYPE tsfSelType,   
   [in] VSTASKLISTSELECTIONSCROLLPOS tsspScrollPos  
);  

Applies to