Extends
vs.ui.ToolBar.Item.
The vs.ui.ToolBar.Button class implements a button control for the vs.ui.ToolBar.
It provides the ability for the user to customize the tab bar with the
you own button image.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
vs.ui.ToolBar.Button(config)
The vs.ui.ToolBar.Button class
|
| Field Attributes | Field Name and Description |
|---|---|
|
The name of the button from the list (vs.ui.ToolBar.BUTTON_ADD,.
|
- Fields borrowed from class vs.ui.ToolBar.Item:
- position
- Fields borrowed from class vs.ui.View:
- autosizing, bubbling, enable, hideAnimation, layout, maxScale, minScale, rotation, scaling, setHideAnimation, setShowAnimation, showAnimmation, size, transformOrigin, translation, visible
- Fields borrowed from class vs.core.Object:
- getOwnPropertyDescriptor, getPropertyDescriptor, id, propagateChange
| Method Attributes | Method Name and Description |
|---|---|
|
setImage(button)
Allows to set a background image for the ToolBar button
|
- Methods borrowed from class vs.ui.View:
- add, addClassName, addCssRule, addCssRules, animate, bind, clone, createAndAddComponent, getBorder, getComputedStyle, getMargin, getPadding, getStyle, hasClassName, hide, init, isChild, notifyToParent, redraw, remove, removeAllChild, removeClassName, rotate, scale, setStyle, setStyles, setVisible, show, translate, unbind, viewDidAdd
- Methods borrowed from class vs.core.EventSource:
- nodeBind, nodeUnbind, propagate
- Methods borrowed from class vs.core.Object:
- configure, getProperties, parseJSON, propertyChange, toJSON
Class Detail
vs.ui.ToolBar.Button(config)
The vs.ui.ToolBar.Button class
Author: David Thevenin.
Author: David Thevenin.
// Simple example: (the button will have the platform skin)
var config = {}
var config.id = 'bar';
var bar = vs.ui.ToolBar (config);
bar.init ();
var button = vs.ui.ToolBar.Button ({id:"back"});
button.init ();
button.setImage ("resources/images/back_icon.png);
button.position = vs.ui.ToolBar.LEFT_POSITION;
bar.addItem (button);
bar.bind ('itemselect', this);
- Parameters:
- {Object} config
- the configuration structure [mandatory]
Field Detail
{String}
name
The name of the button from the list (vs.ui.ToolBar.BUTTON_ADD,...)
If you want use you own button with your own image, you can set it
using "setImage" method.
Method Detail
setImage(button)
Allows to set a background image for the ToolBar button
- Parameters:
- {String} button
- image path