Add Schematics Commands to ToolbarControl.
[C#]
///<summary>Add Schematics Commands to ToolbarControl</summary> /// ///<param name="toolbarControl">An IToolbarControl interface to which schematic commands will be added.</param> /// ///<remarks></remarks> public void AddSchematicsCommandsToToolbarControl(ESRI.ArcGIS.Controls.IToolbarControl toolbarControl) { // Call to add the schematics commands to the ToolbarControl // For example, if a ToolbarControl named axToolbarControl1 exists use the following code: // AddSchematicsCommandsToToolbarControl(axToolbarControl1.Object as ESRI.ArcGIS.Controls.IToolbarControl); toolbarControl.AddItem("esriControls.ControlsSchematicCreateDiagramCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicSaveDiagramCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicUpdateDiagramCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicLayoutPropertiesCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicDecreaseLabelSizeCommand", -1, -1, true, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicIncreaseLabelSizeCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicRestoreLabelSizeCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicDecreaseSymbolSizeCommand", -1, -1, true, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicIncreaseSymbolSizeCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicRestoreSymbolSizeCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicSelectElementTool", -1, -1, true, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicMoveElementTool", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicSelectRootTool", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicSelectEndTool", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicRemoveLinkPointsCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicSquareLinksCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicLayoutExecuteCommand", -1, -1, true, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicLayoutToolControl", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicUndoCommand", -1, -1, true, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); toolbarControl.AddItem("esriControls.ControlsSchematicRedoCommand", -1, -1, false, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly); }
[Visual Basic .NET]
'''<summary>Add Schematics Commands to ToolbarControl</summary> ''' '''<param name="toolbarControl">An IToolbarControl interface to which schematic commands will be added.</param> ''' '''<remarks></remarks> Public Sub AddSchematicsCommandsToToolbarControl(ByVal toolbarControl As ESRI.ArcGIS.Controls.IToolbarControl) ' Call to add the schematics commands to the ToolbarControl ' For example, if a ToolbarControl named axToolbarControl1 exists use the following code: ' AddSchematicsCommandsToToolbarControl(AxToolbarControl1.Object) toolbarControl.AddItem("esriControls.ControlsSchematicCreateDiagramCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicSaveDiagramCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicUpdateDiagramCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicLayoutPropertiesCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicDecreaseLabelSizeCommand", -1, -1, True, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicIncreaseLabelSizeCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicRestoreLabelSizeCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicDecreaseSymbolSizeCommand", -1, -1, True, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicIncreaseSymbolSizeCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicRestoreSymbolSizeCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicSelectElementTool", -1, -1, True, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicMoveElementTool", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicSelectRootTool", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicSelectEndTool", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicRemoveLinkPointsCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicSquareLinksCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicLayoutExecuteCommand", -1, -1, True, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicLayoutToolControl", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicUndoCommand", -1, -1, True, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) toolbarControl.AddItem("esriControls.ControlsSchematicRedoCommand", -1, -1, False, 0, ESRI.ArcGIS.SystemUI.esriCommandStyles.esriCommandStyleIconOnly) End Sub