Button class

The Button class is a graphical object able to launch an action when clicked or designated by the mouse.

Creation

There are no constructors for this class. Buttons are created with the addButton, the addButtonImage and the addButtons methods of DFrame, Bar or BarLayer classes:

var button = dFrame.addButton(parameters): Instantiate a Button on a DFrame

var button = bar.addButton(parameters): Instantiate a Button on a Bar.

var button = barLayer.addButton(parameters): Instantiate a Button on a BarLayer

Note: var menu = xxxx.addMenu also instantiate a button if it is a pop-menu. A handle on this Button can be obtained with the Menu.getButton method.