Author Topic: Add title to toolbar button  (Read 2569 times)

Mendrace

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 12
    • View Profile
Add title to toolbar button
« 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 }
    ]
};         

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Add title to toolbar button
« Reply #1 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(){ }

Mendrace

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Add title to toolbar button
« Reply #2 on: March 27, 2017, 05:52:22 pm »
Many Thanks. Has worked perfectly.