콤보 상자를 만들고 템플릿에 'qtip'속성을 삽입하여 퀵 팁을 삽입합니다 (예 : this 질문). QuickTips를 제외하고 모두 잘 작동합니다. 키보드로 탐색 콤보 박스 목록에 표시되지 않습니다.Extjs 키보드 선택시 콤보 상자의 퀵 팁
누구나 키보드로 콤보 목록을 탐색 할 때 어떻게 퀵 팁을 사용할 수 있는지 알고 있습니까? extjs-3.4.0을 사용하고 있습니다. 감사합니다.
내 콤보는 다음이 당신을 위해 자동으로 발생되지 않는 이유는 그래서
Ext.extend(Ext.form.ComboBox, {
tpl:'<tpl for="."><div ext:qtip="{tooltip}" class="x-combo-list-item">{item}</div></tpl>',
selectPrev:function() {
var ct = this.store.getCount();
var idx = 0;
if (ct > 0) {
if (this.selectedIndex == -1) {
this.select(0);
} else if (this.selectedIndex !== 0) {
idx = this.selectedIndex - 1;
this.select(this.selectedIndex - 1);
}
var el = this.view.getNode(idx);
if (el)
eventFire(el, "mouseover");
}
},
selectNext:function() {
var ct = this.store.getCount();
var idx = 0;
if (ct > 0) {
if (this.selectedIndex == -1) {
this.select(0);
} else if (this.selectedIndex < ct - 1) {
idx = this.selectedIndex + 1;
this.select(idx);
}
var el = this.view.getNode(idx);
if (el)
eventFire(el, "mouseover");
}
},
onViewOver:function (e, t) {
var item = this.view.findItemFromChild(t);
if (item) {
var index = this.view.indexOf(item);
this.select(index, false);
}
}
});
당신 말이 맞아요. 해결책을 찾았습니다. 사용자 정의 ComboBox에서 selectNext 및 selectPrev 메서드를 재정의하고 'mouseover'이벤트를 끝에 발생시킵니다. 감사! – ice
다음 사람이 다시 사용할 수 있도록 게시물을 편집하고 코드를 표시해야합니다. –