AutoPopup (C++)
Description
This example uses a pop-up menu. When you press the mouse button, the pop-up menu appears where you clicked the mouse.
Code
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
PopupMenu1->AutoPopup = false;
}
void __fastcall TForm1::FormMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
int X, int Y)
{
PopupMenu1->Popup(Left + X, Top + Y);
}
Uses
- Vcl.Menus.TPopupMenu.AutoPopup ( fr | de | ja )
- Vcl.Menus.TPopupMenu.Popup ( fr | de | ja )