wijmo有提供一个tooltip类,可以创建后,在鼠标在grid上移动时展示
https://www.grapecity.com/wijmo/ ... ps#demo_source_name
- const tt = new wjcCore.Tooltip();
- grid.hostElement.addEventListener('mousemove', (e: MouseEvent) => {
- let hti = grid.hitTest(e);
- if (hti.panel === grid.cells) {
- let elem = hti.panel.getCellElement(hti.row, hti.col);
- let txt = this.getElemenetText(elem);
- tt.hideDelay = 999999;
- let rc = new wjcCore.Rect(e.pageX, e.pageY - 10, 10, 10);
- tt.show(elem, txt, rc);
- }
- });
复制代码 |