Page 1 of 1

rva actions protected instead of private

Posted: Mon Mar 10, 2008 11:13 am
by erikvdw
In richviewactions.pas TRVAPopupMenuHelper and TRVAPopupMenu contains private procedures and declarations.
If this will be protected we can use an inherited class

We have our own rvactions which we want to add in the preparepopup.

Posted: Mon Mar 10, 2008 5:34 pm
by Sergey Tkachenko
You can add your actions in OnPopup event.

thanks

Posted: Tue Mar 11, 2008 8:16 am
by erikvdw
It works fine.

Code: Select all

  lMiCopy := TMenuItem.Create( rvaPopupMenu );
//our own implentation
  lMiCopy.Action := rvActionCopy;            
//insert on position 1. Items starts on position 0   
  RVAPopupMenu.Items.Insert(1, lMiCopy); 
One remark:
You have to created the menu item each time.
lMiCopy will be destroyed by clearItems when the popup event is executed secondtime.
When destroying RVAPopupMenu this menuitem will be destroy by tmenuItem.destroy