表格新增右键单击回调函数
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user