## CreateToolbarControl

### Description

Creates a new control on a toolbar. Toolbar Controls allow you to tweak the layout of your toolbar by adding space and line separators, forcing line breaks, group headers and cascading menus. See siToolbarControl for a complete list of options.

### Scripting Syntax

    CreateToolbarControl( Toolbar, Type, Name, [InsertAt] );

### Parameters

Parameter | Type | Description
--- | --- | ---
Toolbar | String | Unique identifier of the toolbar to which the button is added.
Type | siToolbarControl | Type of control
Name | String | Display name for control
InsertAt | Integer | Insert position into toolbar, -1 means add at end. Default Value: -1 add at end

### Examples

#### JScript Example

    // Create Toolbar with controls
    var uidToolbar = CreateToolbar("My Toolbar");
    var uidCmd = commands("Info Scene").uid;
    CreateToolbarButton( uidToolbar, uidCmd );
    CreateToolbarControl( uidToolbar, siTBCtrlLineSeparator, "line separator" );
    CreateToolbarButton( uidToolbar, uidCmd );
    CreateToolbarControl( uidToolbar, siTBCtrlMenu, "menu button" );
    CreateToolbarButton( uidToolbar, uidCmd );
    CreateToolbarControl( uidToolbar, siTBCtrlLineBreak, "line break" );
    CreateToolbarButton( uidToolbar, uidCmd );
    CreateToolbarControl( uidToolbar, siTBCtrlGroupHeader, "group header" );
    CreateToolbarButton( uidToolbar, uidCmd );
    CreateToolbarControl( uidToolbar, siTBCtrlBlankSeparator, "blank separator" );
    CreateToolbarButton( uidToolbar, uidCmd );

### See Also

CreateToolbar CreateToolbarButton CreateScriptCommand