How to get the PopupPoint of a TPopupMenu (Views: 101)
I have a popup menu assigned to a TListView. I'm trying to get the ListItem where the right click occured. I can not get the coords where the popup click happened due to the fact that PopupMenu.PopupPoint is protected.
TCrackPopupMenu = class(TPopupMenu)
procedure TForm1.PopupMenu1Popup(Sender: TObject);
pt := TCrackPopupMenu(PopupMenu1).PopupPoint;
Label1.Caption := Format('Popped up at: X = %d, Y = %d', [pt.x, pt.y]);
By the way, PopupPoint returns screen coordinates.
<< Back to main page