MapInfo Pro

Welcome to the MapInfo Pro community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Here are some useful links where you can find more information:

Product Announcements  Product Documentation  Ideas Portal

Discussions

Members

Resources

Events

 View Only

How can I disable the windows right click menu?

  • 1.  How can I disable the windows right click menu?

    Posted 06-27-2018 11:50

    Hi, We're trying to prevent users from closing windows by mistake. I've set the window required to the front then used:

     dockMgr = GetDockingManager(theMapInfoApplication)

     iWinThis = GetDockingManagerActiveWindow(dockMgr)

       Call SetDockingManagerProperty(dockMgr, iWinThis,"IsContextMenuButtonVisible","false")

       Call SetDockingManagerProperty(dockMgr, iWinThis,"IsContextMenuVisible","false")

       Call SetDockingManagerProperty(dockMgr, iWinThis, "CanClose", "false")

    The 'CanClose' disables the cross in the window but they can still right click and close/clone the window via the right click menu. I thought the first two commands would have disabled the menu.

    we also include:

      Call SetDockingManagerProperty(dockMgr, iWinThis, "CanDrag", "false")

      Call SetDockingManagerProperty(dockMgr, iWinThis, "CanDock", "true")

      Call SetDockingManagerProperty(dockMgr, iWinThis, "CanFloat", "false")

      Call SetDockingManagerProperty(dockMgr, iWinThis, "State", "Document")

    to lock down what the user can do, I'm not sure if this would have affected the menu commands.

     

    We're still using MBv16.0.3 with MIv16.0.3, so if this is fixed in v17 then we'll have to live with it until we upgrade everyone.

    Thanks

    David