MapInfo Pro

 View Only

Tool buttons on custom tabs

  • 1.  Tool buttons on custom tabs

    Posted 6 hours ago

    Hi,

    I have created a custom tab group that recreates some regular tool buttons for ease of access, but when I use them I have to click on the map window twice to get them to activate. The map window is active and "front". I may not be recreating them in the best way. Any tips welcome. 

    For example, I replicate the Zoom tool like this:

    Toolbutton
    HelpMsg "Zoom"
    Calling ZoomTool
    Cursor 129
    icon 4
    Sub ZoomTool
    Run Menu Command 1722  'Define M_TOOLS_SEARCH_RECT 1722
    Run Menu Command 1705  'Define M_TOOLS_EXPAND 1705
    End Sub
    Other things I've tried
    Set Window intWnd Front (at the top of the subroutine)
    Run Menu Command 2951
    Run Menu Command 2952
    Run Menu Command M_LAYOUT_ZOOM_IN  (etc.)
    Similarly, I recreate the Draw Polygon tool:
    Sub DrawTool
    Run Menu Command 1714
    End Sub
    Thanks,
    Steve


    ------------------------------
    Steve Oram
    Biodiversity Officer
    PTES
    London
    ------------------------------