2017-04-05 26 views
0

我是新来的ext js。我的要求是在ext js 6.0.1中的禁用组件上显示工具提示(例如'按钮','textfield','datepicker'等xtype)。工具提示禁用组件在ext js 6.0.1

我很感激,如果有人面临相同的问题,并有相同的解决方案。

+0

ExtJS的允许显示在禁用的组件尖状button.You可以使用配置*提示*或在此链接中使用setTooltip()方法按钮: http://docs.sencha.com/extjs/5.0.0/api/Ext.button.Button.html#method-setTooltip – Tejas

回答

1

一种简单的方式展现在ExtJS的禁用按键提示是为.x-item-disabledpointer-events:none样式规格改为pointer-events:all

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

见小提琴here

0

对于按钮 - 添加提示配置。

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

当您禁用按钮。

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

你可以做到这一点programmaticly:

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

或部件后进行初始化:

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