Context menu over rulers

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

relapse
User
Posts: 167
Joined: Wed Jan 18, 2012 11:10 am

Context menu over rulers

Post by relapse »

Hi! Starting my program I forbid all context menus using the method

Code: Select all

SetProperty("General.DenyAllContextMenus", 1)
This seems not to be applicable to the context menu over the rulers. How could I disable that one?


Thanks for your replies!
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: Context menu over rulers

Post by Stefan - PDF-XChange »

Hi Relapse,

One obvious solution is to hide the rulers, but I guess you need them!
Will ask the UI specialists if there's another way to disable that!

Best,
Stefan
relapse
User
Posts: 167
Joined: Wed Jan 18, 2012 11:10 am

Re: Context menu over rulers

Post by relapse »

Yes, Stefan, you are right, as always, I do need the rulers (but without the context menu). :D
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Context menu over rulers

Post by Vasyl - PDF-XChange »

Hi relapse.

You can use another way to disable this menu:

Code: Select all

youreventhandler OnEvent(type, name, ..)
{
    if ((type == PXCVA_OnNamedNotify) AND (name == ""Notifications.ContextMenu"))
    {   
         string menuName;
         pdfViewer.SetProperty("Notifications.ContextMenu.MenuName", out menuName, 0);
         if (menuName == "MeasurementOptions")
         {
               pdfViewer.SetProperty("Notifications.ContextMenu.UserChoice", -1, 0); // -1 to skip this menu
         }
    }
}
Look to our SDK Help for more information...

HTH
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
relapse
User
Posts: 167
Joined: Wed Jan 18, 2012 11:10 am

Re: Context menu over rulers

Post by relapse »

Hi, Vasyl! It functions perfectly, thank you very much! :D
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: Context menu over rulers

Post by Stefan - PDF-XChange »

:)