Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

The sample "TOCControlContextMenu" demonstrates how to display a context menu from the AxTOCControl. When I run this sample and right-click on the TOC control the context menu pops up and remains displayed until I select a menu item. In my application the right-click displays the context menu but as soon as I release the right-mouse-button the first item in the menu is selected. I can see no substantial differences in the code. Has anyone observered (and possibility overcome) this behavior before?

share|improve this question
    
It seems that the popupmenu was positioned too close to the mouse cursor. Since it is impossible to turn off selection with the right-mouse-button in the ESRI popupmenu the only solution I could find was to bump the menu a few pixels over (+5.) This worked. –  Chaz Oct 31 '11 at 17:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.