Adds a toolbar button linked to the command identified by the supplied Command Id to this Toolbar.
Defined As
Parameters
CommandId
[in]
The Command
ID of a command to link to the new button that is being added.
Execution Result
If this method succeeds, the return value will be Success. If the command ID is invalid, the return value will be InvalidArgument.
Remarks
If this method succeeds, the ID supplied will be linked to the new button that is added. The Commands properties will be applied to that button. (its icon, tooltip, security) If this button is pressed, the CommandExecuted event will raise with this Command ID.
See Also
Calling Syntax
This example assumes there is a valid ToolbarButtons collection as retrieved from an ObjectView (for example, VBA: objectView.Toolbars.Item(1).Buttons).
[VBA]
Sub Example(Buttons As Object)
Buttons.Add("Citect_Command_Help")
End Sub
[Cicode]