Das Event ruft die Form auf: (bzw eine erstellt eine Instanz davon)
Delphi-Quellcode:
procedure TMainForm.MClick(Sender : TObject; Button : TMouseButton; Shift : TShiftState; X, Y : Single);
var
ConMenue : TContextMenue;
begin
if (Sender is TBarButton) then
begin
if (ssRight in Shift) then
begin
ConMenue := TContextMenue.Create(MainForm);
ConMenue.Top := Trunc(Platform.GetMousePos.Y);
ConMenue.Left := Trunc(Platform.GetMousePos.X);
ConMenue.FBB := TBarButton(Sender);
ConMenue.ShowModal;
ConMenue.Free;
end;
end;
end;