ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Mendrace on March 26, 2017, 01:20:49 am

Title: Add title to toolbar button
Post by: Mendrace on March 26, 2017, 01:20:49 am
Is it possible to set title / hint with a toolbar button?

var toolbar = {
    cls: 'pq-toolbar-crud',
    items: [
        {
            type: 'button',
            label: 'Add',
            icon: 'ui-icon-plus',
            listener: function(){ }
        },
        {
            type: 'checkbox',
            label: 'Merge cells',
            value: true, //checked initially.
            listener: function(){ }           
        },
        { type: 'button', label: 'Delete', icon: 'ui-icon-minus', listener: deletehandler }
    ]
};         
Title: Re: Add title to toolbar button
Post by: paramvir on March 27, 2017, 12:04:58 pm
It can be done with help of attr property which stands for html attributes.

type: 'button',
attr: 'title="Title here"',
label: 'Add',
icon: 'ui-icon-plus',
listener: function(){ }
Title: Re: Add title to toolbar button
Post by: Mendrace on March 27, 2017, 05:52:22 pm
Many Thanks. Has worked perfectly.