Bug Report Q442126
Visible to All Users

The pop-up position is incorrectly calculated for a toolbar popup menu

created 12 years ago

I have an application that docks to the top of the screen. When I use a dxbarpopupmenu and try to pop up a menu at the mouse position on right-click, it gets the x coordinate, but the y coordinate comes up underneath my application. I realize this is because the 'work area' of the screen is the region underneath my application, so how do I get around this?

Comments (3)
DevExpress Support Team 12 years ago

    I was not able to reproduce this behavior. Would you please provide us with a sample project to demonstrate the issue? We will examine it and do our best to find a solution.

      Ok, I'll work on that. In the meantime, if it helps, I'm referring to the AppBar capability from windows api. Using that is how my app 'docks' to the top.

        Ok, here is a test app, you should see how it reserves space at the top of the screen, uses that for the app and when you right-click on it, the menu pops up underneath the app instead of at the mouse position

        Answers

        created 12 years ago (modified 12 years ago)

        Hello Trevor,
        Thank you for your clarification. You can create a TdxBarPopupMenuLink in the TdxBarManager.PopupMenuLinks property and set its Control property to your form and PopupProperty - to the necessary TdxBarPopupMenu.
        I've modified your sample using this approach. I hope this will help you achieve the required functionality.

          Comments (2)

            Thanks Mikhail. Unfortunately, the changes you made caused the bar to not reserve that space at the top of the screen anymore, so it just started at the top like a normal application. On line 1033 you put SHAppBarMessage(ABM_QUERYPOS, AppBarInfo); where I originally had SHAppBarMessage(ABM_SETPOS, AppBarInfo); Once I set that back it properly reserved and used that top area, but then your suggestion of the TdxBarPopupMenuLink did not work.

            DevExpress Support Team 12 years ago

              I have managed to reproduce this problem. I am forwarding this issue to our developers for further processing.
              You will receive an automatic message once the status of this issue is changed.

              Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

              Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.