AutoPopup (Delphi)
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
procedure TForm1.FormCreate(Sender: TObject);
begin
PopupMenu1.AutoPopup := False;
end;
procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
PopupMenu1.Popup(Left + X, Top + Y);
end;
Uses
- Vcl.Menus.TPopupMenu.AutoPopup ( fr | de | ja )
- Vcl.Menus.TPopupMenu.Popup ( fr | de | ja )