ImageButton
This is a button with an image. Unlike a button, it does not have a text label, but can also have a badge with a number and can be two state.
Related sample: Toolbar. ImageButton
Adding ImageButton
ImageButton can be easily added to a toolbar with the help of the add() method of Tree Collection:
toolbar.data.add({
type: "imageButton",
count: 10,
src: "../img/avatar.png"
});
Properties
You can provide the following properties in the configuration object of an ImageButton control.
Working with ImageButton
Just like a button, imageButton can be hidden, disabled and can have a tooltip. You can also manipulate the states of a two state imageButton.
Check the full list of available operations in the Toolbar API and Tree Collection API.