trichview.com Forum Index trichview.com
TRichView support forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[RichViewActions] adding items in TRVAPopupMenu

 
Post new topic   Reply to topic    trichview.com Forum Index -> Examples, Demos
View previous topic :: View next topic  
Author Message
Sergey Tkachenko
Site Admin


Joined: 27 Aug 2005
Posts: 6607

PostPosted: Wed Dec 16, 2009 5:26 pm    Post subject: [RichViewActions] adding items in TRVAPopupMenu Reply with quote

TRVAPopupMenu provides a quick access to the most frequently used actions. It always contains some default set of actions (clipboard, font, paragraph, bullets&numbering, hyperlink) and may be some additional actions (when clicking on a picture or a table).

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:
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;
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    trichview.com Forum Index -> Examples, Demos All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group