tooltip

sets a popup message next to the button when a cursor points to it

string|boolean|function|object tooltip;

Example

// show default tooltip
webix.ui({
    view:"button", value:"Add new", tooltip:true
});
 
// tooltip as a string
webix.ui({
    view:"button", value:"Edit", tooltip:"#value# a record"
});
 
// tooltip as a function
webix.ui({
    view:"button", value:"Edit",
    tooltip:function(obj){
        return (obj.value + " a record");
    }
});
 
// tooltip as a configuration object
webix.ui({
    view:"button", value:"Edit",
    tooltip:{
        template:"#value#", dx:10, dy:20
    }
});

Related samples

Details

If you define the tooltip as a function, it receives one parameter - the configuration object of the button.

If you define the tooltip as an object, you can configure the tooltip and define its template as a string or a function like in the previous two examples:

// tooltip as a configuration object
webix.ui({
    view:"button", value:"Edit",
    tooltip:{
        template:function(obj){
            return (obj.value + " a record");
        },
        dx:10, dy:20
    }
});
See also
Back to top