childIndex(child, [new_index])
Class: MenuBar. Method inherited from UIComponent.
Description:
Gets or sets the index of a child component within this container. It also changes z-order. When a integer higher than -1 is returned, it also confirms that passed component is indeed a child of this container.
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
Object |
Child component |
|
|
number |
The new index to assign to the child. |
Returns:
If new_index is provided, returns this component. If the child is not found in this container, returns null. Otherwise, returns the child's current z-index.
Type: this | null | number
