Partager via


IVsToolbox3.SetIDOfTab(String, String) Method

Definition

Sets the canonical ID for the given Toolbox tab.

public:
 int SetIDOfTab(System::String ^ lpszTabName, System::String ^ lpszTabID);
public:
 int SetIDOfTab(Platform::String ^ lpszTabName, Platform::String ^ lpszTabID);
int SetIDOfTab(std::wstring const & lpszTabName, std::wstring const & lpszTabID);
public int SetIDOfTab (string lpszTabName, string lpszTabID);
abstract member SetIDOfTab : string * string -> int
Public Function SetIDOfTab (lpszTabName As String, lpszTabID As String) As Integer

Parameters

lpszTabName
String

[in] The localized name of the Toolbox tab.

lpszTabID
String

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

Returns

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.

Applies to