Q:  How do I assign a method to a dynamically created menu item?

A:

unit Unit1;

interface

uses
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, StdCtrls, Menus;

type
  TForm1 = class(TForm)
    MainMenu1: TMainMenu;
    one1: TMenuItem;
    Button1: TButton;
    N111: TMenuItem;
    N121: TMenuItem;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    procedure MonkeyBoy(sender: TObject);
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var
  m: TMenuItem;
begin
  m := TMenuItem.create(self);
  with m do
  begin
    name := 'Lloyd1';
    caption := '1-3';
    OnClick := MonkeyBoy;
  end;
  one1.add(m);
end;

procedure TForm1.MonkeyBoy(sender: TObject);
begin
  ShowMessage('Lloyd is the greatest!!!');
end;
 

end.