Altova Authentic 2025 Desktop

Property: Toolbars as Commands (read-only)

 

Dispatch Id: 1005

 

Description:

This property provides information about the structure of AuthenticDesktopControl toolbars, as a Command object. The Command object contains all available toolbars of Authentic Desktop. To access the toolbars, use the SubCommands property of the Toolbars property. Each toolbar is also a Command object. For each toolbar, you can then further iterate through their SubCommands property in order to get their commands (this technique may be used, for example, to create the application's toolbars programmatically).

 

 

public void GetAuthenticToolbars()
{
  // Get the application toolbars from the Authentic ActiveX control assigned to the current form      
  AuthenticControlLib.XMLSpyCommands toolbars = this.axAuthenticDesktopControl1.Toolbars;
 
  // Iterate through all toolbars
  for (int i = 0; i < toolbars.Count; i++)
  {
    AuthenticControlLib.XMLSpyCommand toolbar = toolbars[i];
    Console.WriteLine();
    Console.WriteLine("The toolbar \"{0}\" has the following commands:", toolbar.Label);
 
    // Iterate through all commands of this toolbar
    for (int j = 0; j < toolbar.SubCommands.Count; j++)
    {
        AuthenticControlLib.XMLSpyCommand cmd = toolbar.SubCommands[j];
        // Output only command objects that are not separators
        if ( ! cmd.IsSeparator)
        {
          Console.WriteLine("{0}, {1}, {2}", cmd.ID, cmd.Name, cmd.Label.Replace("&", ""));
        }    
    }
  }
}

C# example

© 2018-2024 Altova GmbH