最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Tool tip on disable component in ext js 6.0.1 - Stack Overflow

programmeradmin3浏览0评论

I am new to the ext js. My requirement is to show tool tip on the disable ponent ( 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.

I am new to the ext js. My requirement is to show tool tip on the disable ponent ( 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.

Share Improve this question edited Apr 5, 2017 at 16:58 datta sawant asked Apr 5, 2017 at 14:52 datta sawantdatta sawant 111 silver badge3 bronze badges 1
  • Extjs allows to show tip on disabled ponents like button.You can use config tooltip or use setTooltip() method for button as given in this link: docs.sencha./extjs/5.0.0/api/… – Tejas Commented Apr 7, 2017 at 5:39
Add a ment  | 

3 Answers 3

Reset to default 4

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

You can do this programmaticly:

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

Or after the ponent is initialized:

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

For Button - add tooltip config.

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

when you are disabling button.

button.disable();
button.setTooltip("Message");
发布评论

评论列表(0)

  1. 暂无评论