Allows access to a toolbar item.
.NET Syntax
Visual Basic (Declaration) | |
---|
Public Interface IToolbarItem |
C# | |
---|
public interface IToolbarItem |
JavaScript | |
---|
Object dsToolbarItem |
COM native C++ | |
---|
interface IToolbarItem |
Example
The following code snippets show how to add a toolbar button with a ToolTip to a toolbar:
COM native C++
IToolbarPtr pToolbar = m_DsApp->AddToolbar( m_sApiUuid, dsUIState_Document, L"DsAddin Toolbar");
IToolbarItemPtr pToolbarItem;
pToolbarItem = pToolbar->InsertToolbarItem( m_sApiUuid, dsToolBarItemType_UserCommand, ++position, L"Open Notepad", pNotepad.GetUserCommandID() );
C++
dsToolbar_ptr pToolbar;
dsApp->AddToolbar( myApplication::appID, dsUIState_Document, ToolbarName, &pToolbar );
if( NULL != pToolbar )
{
dsToolbarItem_ptr pToolbarItem;
dsString ButtonName = L
"Notepad";
dsString UserCmdID;
pMenu->GetID( &UserCmdID );
pToolbar->InsertToolbarItem( myApplication::appID, dsToolBarItemType_UserCommand, 1, ButtonName, UserCmdID, &pToolbarItem );
Back to top
Remarks
Accessors
See Also