IVsTaskList2.SelectItems Method

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)

Syntax

'Declaration
Function SelectItems ( _
    nItems As Integer, _
    pItems As IVsTaskItem(), _
    tsfSelType As UInteger, _
    tsspScrollPos As UInteger _
) As Integer
int SelectItems(
    int nItems,
    IVsTaskItem[] pItems,
    uint tsfSelType,
    uint tsspScrollPos
)
int SelectItems(
    [InAttribute] int nItems, 
    [InAttribute] array<IVsTaskItem^>^ pItems, 
    [InAttribute] unsigned int tsfSelType, 
    [InAttribute] unsigned int tsspScrollPos
)
abstract SelectItems : 
        nItems:int * 
        pItems:IVsTaskItem[] * 
        tsfSelType:uint32 * 
        tsspScrollPos:uint32 -> int
function SelectItems(
    nItems : int, 
    pItems : IVsTaskItem[], 
    tsfSelType : uint, 
    tsspScrollPos : uint
) : int

Parameters

  • nItems
    Type: System.Int32

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

Return Value

Type: System.Int32
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
);

.NET Framework Security

See Also

Reference

IVsTaskList2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace