Keith,
The context menus can be alter using the classic Alter Menu statement. I have done that also without making the LEGACY tab appear.
'**Adding menu item to the Mapper window rightclick menu
Alter Menu ID M_SHORTCUT_MAPPER add
GetResItemStr("MNU_CREATE_MAP_EXTENT")
HelpMsg GetResItemStr("MNU_HLP_CREATE_MAP_EXTENT")
Calling MAPEXTCreateMenu
But if you start modifying “normal” menus I would expect that to have some side effects as these don’t really exist.
You can also use the RibbonLib to modify the context menus, such as the MapperShortcut:
'**Adding a menu item to the Layer Control Maps Context menu
nCtrlIdx = RBNCntxtMenuAddMenuItem(MenuId_MapperShortcut, "mapCntxtMapExtent", GetResItemStr("MNU_CREATE_MAP_EXTENT"), "")
If nCtrlIdx > 0 Then
Call RBNControlSetToolTipIdx(nCtrlIdx, PRGIGetApplicationName(), GetResItemStr("MNU_HLP_CREATE_MAP_EXTENT"), "")
Call RBNControlSetIconsIdx(nCtrlIdx, CONTROL_SIZE_SMALL, "", PATH_IMAGES & "MapWindowExtent_24x24.png")
Call RBNControlSetLeftMarginIdx(nCtrlIdx, 0)
Call RBNControlSetCustomMBXHandlerIdx(nCtrlIdx, "MAPEXTCreateMenu")
End If
You can also modify the application context menu seen on the application itself in the Tools window:
nCtrlIdx = RBNToolContextMenuAddMenuItem("rateApplication", GetResItemStr("MNU_RATE_APPLICATION"), "")
If nCtrlIdx > 0 Then
Call RBNControlSetToolTipIdx(nCtrlIdx, PRGIGetApplicationName(), GetResItemStr("MNU_HLP_RATE_APPLICATION"), "")
Call RBNControlSetIconsIdx(nCtrlIdx, CONTROL_SIZE_SMALL, PATH_IMAGES & "CommunityDownloads_16.png", "")
Call RBNControlSetLeftMarginIdx(nCtrlIdx, 0)
Call RBNControlSetCustomMBXHandlerIdx(nCtrlIdx, "MENUGoToCommunityDownloads")
End If
When using the RibbonLib, you can also assign images to the menuitems
What menu did you want to alter?
Peter Horsbøll Møller
Pitney Bowes
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I would do it like this:
Creating the control:
mnbtnSelInfoHandlerIdx = RBNGroupAddButton("btnSelInfoHandler", GetResItemStr("STR_BTN_SEL_INFO_HANDLER"), "", sTabName, sGroupName)
If mnbtnSelInfoHandlerIdx > 0 Then
Call RBNControlToggleIdx(mnbtnSelInfoHandlerIdx, TRUE)
Call RBNControlSetToolTipIdx(mnbtnSelInfoHandlerIdx, PRGIGetApplicationName(), GetResItemStr("STR_TTIP_ENABLE_INFO_SEL"), "")
Call RBNControlSetIconsIdx(mnbtnSelInfoHandlerIdx, CONTROL_SIZE_LARGE, "", PATH_IMAGES & "InfoSelHandlerGreen_32x32.png")
Call RBNControlSetCustomMBXHandlerIdx(mnbtnSelInfoHandlerIdx, "SELINFOSwitchDisplay")
End If
Notice that I use a modular variable (mnbtnSelInfoHandlerIdx) to remember the Index of the control.
I can use this later in my application to switch the state of it.
And here you “switch” the button on/off:
Sub SELINFOSwitchDisplay
mbInfoSelChangedHandlerEnabled = (NOT mbInfoSelChangedHandlerEnabled)
Call RBNControlSelectedIdx(mnbtnSelInfoHandlerIdx, mbInfoSelChangedHandlerEnabled)
If mbInfoSelChangedHandlerEnabled Then
Call RBNControlSetToolTipIdx(mnbtnSelInfoHandlerIdx, PRGIGetApplicationName(), GetResItemStr("STR_TTIP_ENABLE_INFO_SEL"), "")
Call RBNControlSetIconsIdx(mnbtnSelInfoHandlerIdx, CONTROL_SIZE_LARGE, "", msImageFolder & "InfoSelHandlerGreen_32x32.png")
Else
Call RBNControlSetToolTipIdx(mnbtnSelInfoHandlerIdx, PRGIGetApplicationName(), GetResItemStr("STR_TTIP_DISABLE_INFO_SEL"), "")
Call RBNControlSetIconsIdx(mnbtnSelInfoHandlerIdx, CONTROL_SIZE_LARGE, "", msImageFolder & "InfoSelHandlerRed_32x32.png")
End If
End Sub
Initially, I set the state to the opposite of what it was before.
The I use RBNControlSelectedIdx to either check or uncheck my control
And finally, depending on the current state I set the Tooltip text and the image of my control
Peter Horsbøll Møller
EMEA Channel Enablement Specialist
Location Intelligence | MapInfo
M: +45 29 133 769
peter....@pb.com | @phorsbollmoller
pitneybowes.com/dk | mapinfo.com
From: mapi...@googlegroups.com [mailto:mapi...@googlegroups.com] On Behalf Of Keith Tozier
Sent: 18. november 2016 16:47
To: MapInfo-L <mapi...@googlegroups.com>
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
mapinfo-l+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I think I may have to either change the menu item to just MDN and rely upon the end user to look at the ribbon to determine if it is on(green) or off(red)
or create a pop out menu that would be
Create Menu "&MDN" As
"&MDN On..." Calling MDNOnSub,
"&MDN Off..." Calling MDNOffSub
I have attempted to remove the legacy tab when it appears and then the
alter menu item Duplicate_Nodes text "MDN Off"
or
alter menu item Duplicate_Nodes text "MDN On"
Does not work.