Share via


IVsToolbox3.SetIDOfTab Method

Sets the canonical ID for the given Toolbox tab.

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

Syntax

'Declaration
Function SetIDOfTab ( _
    lpszTabName As String, _
    lpszTabID As String _
) As Integer
int SetIDOfTab(
    string lpszTabName,
    string lpszTabID
)
int SetIDOfTab(
    [InAttribute] String^ lpszTabName, 
    [InAttribute] String^ lpszTabID
)
abstract SetIDOfTab : 
        lpszTabName:string * 
        lpszTabID:string -> int
function SetIDOfTab(
    lpszTabName : String, 
    lpszTabID : String
) : int

Parameters

  • lpszTabName
    Type: String

    [in] The localized name of the Toolbox tab.

  • lpszTabID
    Type: String

    [in] The locale-invariant ID of the Toolbox tab.

Return Value

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

Remarks

COM Signature

From vsshell80.idl:

HRESULT IVsToolbox3::SetIDOfTab(
   [in] LPCOLESTR lpszTabName,
   [in] LPCOLESTR lpszTabID
);

The method sets a canonical ID for the given Toolbox tab. The canonical ID, supplied as lpszTabID, is different from the localizable tab name defined when AddTab is called.

While canonical tab names are required to be unique, localized strings change depending on the locale under which the IDE is running. Therefore, the canonical ID must be locale-invariant.

There are no particular restrictions on the format of the canonical ID string, a GUID might be used, or an easy to remembered string in the language of the developer could be employed.

Any VSPackage that creates a Toolbox tab should call the SetIDOfTab method.

.NET Framework Security

See Also

Reference

IVsToolbox3 Interface

Microsoft.VisualStudio.Shell.Interop Namespace