我试图用下面的代码在运行时向combobox
添加提示,但它不起作用:
onStartReport: function (aButton) {
var lTip = Ext.getCmp('datasources');
lTip.setTooltip("Information on datasource");
}
我也尝试过这样做,但得到了一个错误:
onStartReport: function (aButton) {
var tip = Ext.create('Ext.tip.ToolTip', {
target: 'datasources',
html: 'Information on datasource'
});
}
查看经典:
{
xtype: 'combo',
itemId: 'datasources',
name: 'datasources',
fieldLabel: 'Data sources',
displayField: 'description',
valueField: 'id',
queryMode: 'local',
value: 0,
forceSelection: true,
editable: false,
store: {
data: [
{id: 0, description: 'OnLine'},
{id: 1, description: 'History'}
],
fields: [
{name: 'id', type: 'int'},
{name: 'description', type: 'string'}
],
autoLoad: true
}
}
https://stackoverflow.com/questions/50525315
复制相似问题