This is an item that contains some text.
Related sample: Toolbar. Title
A Title control can be added to a toolbar with the help of the add() method of Tree Collection:
toolbar.data.add({
type: "title",
value: "APP NAME"
});
You can provide the following attributes in the configuration object of a Title control:
type | (string) the item type, set it to "title". If not specified - the "navItem" type is applied by default. |
id | (string) the id of a control, auto-generated if not set |
parent | (string) the parent of the item |
value | (string) the value of the Title control. You need to set either the value or html property to the title |
html | (string) optional, a string with HTML that should be inserted into the title |
css | (string) adds a custom CSS class |
tooltip | (string) a tooltip for the control |
hidden | (boolean) defines whether a control is hidden |
disabled | (boolean) defines whether a control is disabled |
Title can be hidden and shown with the help of the show()/hide() methods. Pass the id of a Title control as a parameter.
toolbar.show(id);
toolbar.hide(id);
Related sample: Toolbar. Hide/Show
You can add a tooltip to a Title control:
{
type:"title",
value:"2K",
tooltip:"Your subscribers"
}
Related sample: Toolbar. Tooltips
Back to top