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.
rva actions protected instead of private
-
- Site Admin
- Posts: 17534
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
thanks
It works fine.
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
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);
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