Items in TRVAPopupMenu are recreated each time before it is displayed. If you want to add a new item, you need to do it in OnPopup event.
This example adds "Paste Special" command below "Paste":
Code: Select all
procedure TForm3.RVAPopupMenu1Popup(Sender: TObject);
var i: Integer;
mi: TMenuItem;
begin
for i := 0 to RVAPopupMenu1.Items.Count-1 do
if RVAPopupMenu1.Items[i].Action is TrvActionPaste then begin
mi := TMenuItem.Create(RVAPopupMenu1);
mi.Action := rvActionsResource.rvActionPasteSpecial1;
RVAPopupMenu1.Items.Insert(i+1, mi);
break;
end;
end;