表格新增右键单击回调函数

This commit is contained in:
睿 安
2026-01-28 17:15:41 +08:00
parent 2ff880c267
commit 4fe4749826
17 changed files with 53 additions and 21 deletions

View File

@@ -906,6 +906,17 @@ namespace ezui {
void TableView::OnMouseDown(const MouseEventArgs& args) {
__super::OnMouseDown(args);
// 右键单击
if (args.Button == MouseButton::Right) {
int row, col;
if (HitTestCell(args.Location, &row, &col)) {
if (RightClick) {
RightClick(row, col);
}
}
return;
}
if (args.Button != MouseButton::Left) {
return;
}