title: How to Clone Menu Items for TPopupMenu?
body: <p>I want to clone an entire TMenuItem with it's children to another TPopupMenu.
  Here is a <a href="http://embarcadero.newsgroups.archived.at/public.delphi.vcl.components.using/200809/080907220.html" rel="nofollow">nice code</a>:</p>
  
  <pre><code>function CloneMenuItem(SourceItem: TMenuItem): TMenuItem;
  var
    I: Integer;
  Begin
    with SourceItem do
    Begin
      Result := NewItem(Caption, Shortcut, Checked, Enabled, OnClick, HelpContext, Name + 'Copy');
      for I := 0 To Count - 1 do
        Result.Add(CloneMenuItem(Items[I]));
    end;
  end;
  </code></pre>
  
  <p>The following works just fine (b1 is a PopupMenu1.TMenuItem with sub menus):</p>
  
  <pre><code>PopupMenu2.Items.Add(CloneMenuItem(b1));
  </code></pre>
  
  <p>The problem is that I can't clone an <em>entire</em> TPopupMenu if the SourceItem is the root item.
  e.g :</p>
  
  <pre><code>PopupMenu2.Items.Add(CloneMenuItem(PopupMenu1.Items));
  </code></pre>
  
  <p>Wont work. All I can <em>see</em> is 1 Item, as if it was a separator.</p>