DFrame: addBar

A Bar is an area containing BarLayers. BarLayers are layers on wich Buttons and Menus are created. A default BarLayer is created with each Bar.

DFrame.addBar: Create a Bar and its default BarLayer.

Example

var dFrame = new DFrame(parameters)
var bar = dFrame.addBar(parameters)

bar.addButton(parameters)

Demo

file: addBar.html

Run the example
See the source code

Syntax

DFrame.addBar([barStyle[, title[, position]]])

Parameters

barStyle

BarStyle object. The style that will be used to draw the Bar. Set barStyle to null to use Bar's parent default BarStyles.

title

String. The title of the Bar. The setTitleBar method of the BarStyle has to be used with true as parameter so that the title can be seen on the title Bar.

position

See position

Set the position of the Bar. Can be:
String. 'LEFT', 'RIGHT', 'TOP' or 'BOTTOM'
Array. Four integer or strings indicating the left, top, right and bottom positions and sizes of the Bar. In percentages of the parent's Bar if numbers, in pixels if strings.

If omitted the positions defined with the setPos method of the Bar Style are used.

Return value

Bar object