locked
Menus, toolbars, buttons - how to coordinate RRS feed

  • Question

  • Hi;

    In my application, I have a menu, a toolbar and also a form I call 'the road map' where different buttons call different forms. The buttons on the road map have a right click menu associated with them.

    My problem is how to coordinate the menu on top, with the menus I have in the buttons/toolbars so I don't have to update things in 3 places.

    I have tried to call the 'right click menu' (The mpr that is called when a user clicks a button on my roadmap) from the main menu but the menu opens up in a wierd place.

    Any ideas?

    thanks.


    Tuesday, July 8, 2008 3:56 PM

Answers

  • Almost all of the menu items that I'd want to replicate in a shortcut menu call form methods, so the call is just:

    _SCREEN.ActiveForm.SomeMethod()

    in both places. It's not quite as good as having shared code, but it's just one line.


    Tamar
    Friday, July 11, 2008 8:08 PM
    Answerer

All replies

  • Hi Aleniko,

    Based on your post, my understanding of your issue is that you are using the shortcut menu and set its location when it displays. If I misunderstood your issue, tell me.

    I presume that you use the ContextMenu to implement the shortcut menu. As far as I know when you right click the control which binds to the context menu, we can't explicitly control the displayed location of the ContextMenu. We can make the ContextMenu appear only when the user clicked at certain portions of the Control as the workaround. Visit here about this method for your reference. If you have any further issues, feel free to tell us.

    Best regards,
    Riquel
    Thursday, July 10, 2008 8:16 AM
  • Alen - I think rather than trying to use one pop-up in both places, the key is to have them all call on the same data. The SYS(1500) function can help, along with SKPBAR() to let you find out whether a given menu bar is currently disabled.

    Tamar
    Thursday, July 10, 2008 8:21 PM
    Answerer
  • Tamar;

    I'm not sure how this helps... sys(1500) is for system menu items only. I'm trying to use the same 'code' for both my dropdown menus and my buttons/toolbars.

    Thanks.
    Friday, July 11, 2008 7:15 PM
  • Almost all of the menu items that I'd want to replicate in a shortcut menu call form methods, so the call is just:

    _SCREEN.ActiveForm.SomeMethod()

    in both places. It's not quite as good as having shared code, but it's just one line.


    Tamar
    Friday, July 11, 2008 8:08 PM
    Answerer