MapInfo Pro

 View Only
  • 1.  Handler for ToolButton

    Posted 10-27-2020 16:01
    Edited by Evgeny Kleiman 10-28-2020 02:43
    Hello,
    I want to replace old  code
      ToolButton
       ID 993
        Icon 0
       Calling 1701
        Cursor MI_CURSOR_CROSSHAIR
        DrawMode DM_CUSTOM_POINT
       HelpMsg "Select an object.\nSelect segments"

    by ToolButton for Ribbon.
    I defined the button as
    tlbSelSegments = MICtrlCollAddStrStrInt(groupControlColl, "tlbSelSegments", "Select segments", ControlType_ToolButton)
    As I found in your old guide 1701 means M_TOOLS_SELECTOR. But how I should define it for my tlbSelSegments ?
    Thank you

    And additional question: I have in legacy code
    ToggleButton
    ID 984
    Icon 26
    Calling M_EDIT_RESHAPE
    HelpMsg "Reshape.\nReshape"

    As  far as understood ToggleButton is now IRibbonButtonControl with property IsToggle =true
    But what should be instead "Calling M_EDIT_RESHAPE"?

    And what to do with this:
    ToolButton
    ID 985
    Icon 27
    Calling M_TOOLS_ADD_NODE
    ?
    ------------------------------
    Evgeny Kleiman
    Knowledge Community Shared Account
    ------------------------------