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

 

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.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

int SelectItems(
	int nItems,
	IVsTaskItem[] pItems,
	uint tsfSelType,
	uint tsspScrollPos
)

Parameters

nItems
Type: System.Int32

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

pItems
Type: Microsoft.VisualStudio.Shell.Interop.IVsTaskItem[]

[in] An array of IVsTaskList objects.

tsfSelType
Type: System.UInt32

[in] An object of __VSTASKLISTSELECTIONTYPE type.

tsspScrollPos
Type: System.UInt32

[in] An object of __VSTASKLISTSELECTIONSCROLLPOS type.

Return Value

Type: System.Int32

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

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

From vsshell80.idl:

HRESULT SelectItems(
   [in] int nItems, 
   [in, size_is(nItems)] IVsTaskItem* pItems[], 
   [in] VSTASKLISTSELECTIONTYPE tsfSelType, 
   [in] VSTASKLISTSELECTIONSCROLLPOS tsspScrollPos
);
Return to top
Show: