CommandBars properties

The CommandBars interface supports two properties, count and item.

count 
Access  Read-only 
Type  Long 
Description  Returns the number of menu bars and toolbars in the CommandBars collection. 
Usage 
JScript  CommandBars.count;  
VBScript  CommandBars.count 
Example 
// SoftQuad Script Language JSCRIPT:
Application.alert("Command bars = " +
      Application.CommandBars.count);
 

item(variantIndex) 
Returns  CommandBar 
Description  Returns the CommandBar object specified by variantIndex, within the CommandBars collection. variantIndex can be a number (1 to CommandBars.count) or the name of the command bar. 
Usage 
JScript  CommandBars_object.item(variantIndex);  
VBScript  CommandBars_object.item(variantIndex) 
Example 
// SoftQuad Script Language JSCRIPT:
Application.CommandBars.Add("My Toolbar");
//access the command bar
var cmdBar = Application.CommandBars.item("My Toolbar");
Application.alert(cmdBar.name);
 


Right arrow
Next Topic
Left arrow
Previous Topic
Table of contents
Table of Contents

Copyright © SoftQuad Software Inc. 1999