AGI Ui Plugins 11 Send comments on this topic.
OnInitializeToolbar Method (IAgUiPlugin)
See Also  Example
ToolbarBuilder
The toolbar builder provided by the hosting environment. OnInitializeToolbar method is called by the hosting environment when the User Interface plugin is loaded and is never called after that.





Description

Allows the UI plugin to configure a custom toolbar.

Syntax

[Visual Basic .NET]
Public Sub OnInitializeToolbar( _
   ByVal ToolbarBuilder As IAgUiPluginToolbarBuilder _
) 

[C#]
public void OnInitializeToolbar(
IAgUiPluginToolbarBuilder ToolbarBuilder
);

[Managed C++]
public: void OnInitializeToolbar(
IAgUiPluginToolbarBuilder ^ ToolbarBuilder
);

[Java]
public  onInitializeToolbar(
IAgUiPluginToolbarBuilder ToolbarBuilder
);

[Unmanaged C++]
public: HRESULT OnInitializeToolbar(
IAgUiPluginToolbarBuilder * ToolbarBuilder
);

Parameters

ToolbarBuilder
The toolbar builder provided by the hosting environment. OnInitializeToolbar method is called by the hosting environment when the User Interface plugin is loaded and is never called after that.

Example

The example demonstrates how to add a custom button and associate it with a named command.
Add a button to a custom toolbar. Copy Code
void IAgUiPlugin.OnInitializeToolbar(IAgUiPluginToolbarBuilder ToolbarBuilder) 

    //Add a Toolbar Button 
    ToolbarBuilder.AddButton("MyFirstCommand""Example CSharp Ui Plugin Toolbar Button""Open a Custom user interface.", AgEToolBarButtonOptions.eToolBarButtonOptionAlwaysOn, null); 


See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1