卢大师,打扰,请教一个 godking.comboboxEx 气泡提示的问题,godking.comboboxEx 貌似没有.onMouseLeave 和 .onMouseEnter 事件,我分别用 eachControl枚举控件 和 .wndproc消息捕获,好像aardio标准控件都可以实现,godking.comboboxEx不显示,请教如何实现?
![](https://aar.chengxu.online/upload/files/20240625/1719281880.jpg)
import win.ui;
import win.ui.tooltip;
import godking.comboboxEx;
/*DSG{{*/
var winform = win.form(text="aardio Form";right=544;bottom=311;parent=...)
winform.add(
button={cls="button";text="光标位置tooltip";left=90;top=45;right=210;bottom=77;font=LOGFONT(name='SimSun');z=1};
button2={cls="button";text="固定位置tooltip";left=90;top=110;right=210;bottom=142;font=LOGFONT(name='SimSun');z=2};
button3={cls="button";text="控件tooltip";left=90;top=175;right=210;bottom=207;font=LOGFONT(name='SimSun');z=3};
cmbAdapter={cls="comboboxEx";left=257;top=195;right=523;bottom=219;acceptfiles=1;dl=1;dt=1;z=6};
combobox={cls="combobox";left=246;top=117;right=511;bottom=143;edge=1;items={};mode="dropdown";z=5};
edit={cls="edit";text="气泡弹出提示";left=90;top=240;right=210;bottom=272;edge=1;z=4}
)
/*}}*/
//在所有者窗口 winform 上创建 tooltip 提示控件
var tooltipCtrl = win.ui.tooltip( winform );
var balloonTipCtrl = win.ui.tooltip.tracking(winform,false);
winform.cmbAdapter.valueType = type.string;
winform.cmbAdapter.add("网卡1",0/*图片索引*/,"192.168.1.100"/*附加数据*/,0/*右缩进值*/)
winform.cmbAdapter.add("网卡2",0/*图片索引*/,"192.168.0.100"/*附加数据*/,0/*右缩进值*/)
winform.wndproc = function(hwnd,message,wParam,lParam){
select( message ) {
case 0x200/*_WM_MOUSEMOVE*/{
balloonTipCtrl.trackPopup(false); //手动关闭提示
}
}
}
import console
//枚举控件显示气泡
for(name,ctrl in winform.eachControl() ){
if(ctrl){
ctrl.wndproc = function(hwnd,message,wParam,lParam){
select( message ) {
case 0x200{ //_WM_MOUSEMOVE
var x,y,cx,cy = ctrl.getPos(true);
//手动显示提示
//console.log(ctrl.className)
balloonTipCtrl.setText(ctrl.className).trackPopup(true,x+120,y+cy );
}
}
}
}
}
/*
//wndproc获取气泡提示
winform.cmbAdapter.wndproc = function(hwnd,message,wParam,lParam){
select( message ) {
case 0x200 { //_WM_MOUSEMOVE
var x,y,cx,cy = winform.cmbAdapter.getPos(true);
//气泡提示
balloonTipCtrl.setText("IP地址").trackPopup(true,x+120,y+cy );
} }}
*/
winform.show()
win.loopMessage();
return winform;