object = DFrame, Bar of BarLayer

object: addButtons

 

DFrame.addButtons: Create the default Bar and the default BarLayer if the default Bar if not yet created and create Buttons or ButtonImages on the default BarLayer of this default Bar.

Bar.addButtons: Create Buttons or ButtonImages on the default BarLayer of the specified Bar.

BarLayer.addButtons: Create Buttons or ButtonImages on the specified BarLayer.

Demo

file: addButtons.html

Run the example
See the source code

Syntaxes

object.addButtons(buttonsArrayDefinition)

Parameters

buttonsArrayDefinition

See the buttonsArrayDefinition

Return value

no return value

Usage

The main interest of this method is that the table of definitions of buttons is compatible with the addMenu and addContextMenu methods. It will be thus possible to easily create menus corresponding to the buttons of DFrames.

The following code creates the buttons of a DFrame and the associated Context Menu:

var M = new Array()
M[0] = new Array('Button','Close', 'Close')
M[1] = new Array('Button','new DFrame', 'createDFrame()')
dFrame.addButtons(M)
dFrame.addContextMenu(M)