rva actions protected instead of private

General TRichView support forum. Please post your questions here
Post Reply
erikvdw
Posts: 40
Joined: Tue Feb 28, 2006 8:27 am

rva actions protected instead of private

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You can add your actions in OnPopup event.
erikvdw
Posts: 40
Joined: Tue Feb 28, 2006 8:27 am

thanks

Post 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
Post Reply