Menu

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

tdonovan
User
Posts: 61
Joined: Tue Jun 12, 2007 9:21 pm

Menu

Post by tdonovan »

I have your control on a form that contains an Infragistics menu. The problem I am running into is the menu doesn't seem to get notice when I click on your control. Normally there is some event (lostfocus maybe) that triggers the closing of the menu when you click outside of the menu. If I click on other controls or portions of the form, the menu closes automatically, but when I click on the PDF document, the menu stays open. Is there some setting I need to make this work, or what event would be thrown when your control is clicked on that I could add code to close the menu automatically.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Menu

Post by Vasyl - PDF-XChange »

Hi, Tom.

In the new build(upcoming) you will be able to intercept special named event:

Code: Select all

OnEvent(type, name...)
{
     if ((type == PXCVA_OnNamedNotify) and (name == "Global::FocusGained"))
     {
           // hide your pop-up menu because our control has input focus
     }
}
Or in the current build you may use other method (as workaround):

Code: Select all

ax.SetProperty("Notifications.Mouse.Filter", "Down", 0);
ax.SetProperty("Notifications.Keyboard.Filter", "Down", 0);
OnEvent(type, name...)
{
     if ((type == PXCVA_OnNamedNotify) and ((name == "Notifications.Mouse") or (name == "Notifications.Keyboard")))
     {
           // hide your pop-up menu because our control was clicked or has input focus
     }
}
Best
Regards.
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.