VarioMenu VarioMenuItem.Subs collection
Subs collection holds all children of a menu item. This is the way a tree hierarchy is formed.

Syntax:

VarioMenuItem.Subs(index)

Parameters:

index - Identifier of menu item object, present in the collection. In most cases this will be a string. See the following Remarks section.

Remarks:

In the most common case you will use Subs collection just for enumerating child menu items. Index can be anything hold in VARIANT type - object, numeric value, string, etc. It is specified when child menu item is created by CreateSubItem or when a reference to already existing menu item is inserted in Subs collection by Add method. If you use index that is not present in collection error is returned. There is no default value so

New menu item objects are created only with a call to CreateSubItem method on their parent item. This causes the newly created object automatically to be inserted in the Subs collection of its parent. You can use the Add method of the collection object only when you want to insert a menu item that was already created and resides somewhere else. This creates a reference to that menu item and it is present in both or more locations. When you change the state of such menu item, it is changed in all locations where refrences to it are present.

You can use Remove or Clear methods of the collection to delete specified or all children of a menu item. Additional methods are provided for finding the index when you have the object of menu item. See HandyCollection object reference for details.

Applies to:

VarioMenuItem object

newObjects Copyright 2001-2006 newObjects [ ]