datta sawant
datta sawant

Reputation: 11

Tool tip on disable component in ext js 6.0.1

I am new to the ext js. My requirement is to show tool tip on the disable component ( ex. xtype like 'button', 'textfield','datepicker' etc ) in ext js 6.0.1.

I am thankful if anyone face the same issue and having solution on the same.

Upvotes: 0

Views: 3723

Answers (3)

Tiago Sippert
Tiago Sippert

Reputation: 1332

You can do this programmaticly:

var button={
    xtype : 'button',
    tooltip: 'Tooltip',
    text:'Text',
    style: {
        pointerEvents: 'all'
    }
};

Or after the component is initialized:

button.setStyle({pointerEvents: 'all'});

Upvotes: 4

viki
viki

Reputation: 13

For Button - add tooltip config.

var button={
        xtype : 'button',
        id : 'BtnId',
        tooltip:'',
        text:''
};

when you are disabling button.

button.disable();
button.setTooltip("Message");

Upvotes: 0

chrisuae
chrisuae

Reputation: 1112

A simple way to show tooltips on disabled buttons in Extjs is to change the style specification for .x-item-disabled for pointer-events:none to pointer-events:all

<style>
    .x-item-disabled, .x-item-disabled * {
    pointer-events:all;
}
</style>

See fiddle here

Upvotes: 4

Related Questions