VERIFIED SOLUTION i

Resolve issue in MapInfo Pro where Custom tooltips appear at the top of the button instead of at the bottom where the cursor lies

Issue

Custom tooltips appear at the top of the button instead of at the the bottom where the cursor lies. As highlighted in the black box below.

User-added image

Cause

Users can use both of the properties below to adjust the placement of the tooltip.

They are Windows.System.Controls properties and more information can be found here: https://msdn.microsoft.com/en-us/library/ms752368%28v=vs.85%29.aspx

Declare Method SetMIRbnToolTipPlacement Class "MapInfo.Types.MapInfoRibbonToolTip" Lib "MapInfo.Types, Version=12.5.0.0, Culture=neutral, PublicKeyToken=1c8d81d2ee78b75d" alias set_Placement (ByVal MIRbnToolTipInstance As This, ByVal placement As Integer) 

Declare Method SetMIRbnToolTipVertOffSet Class "MapInfo.Types.MapInfoRibbonToolTip" Lib "MapInfo.Types, Version=12.5.0.0, Culture=neutral, PublicKeyToken=1c8d81d2ee78b75d" alias set_VerticalOffSet (ByVal MIRbnToolTipInstance As This, ByVal verticalOffSet As Integer) 


For example, you can modify the sample RibbonCustomization (RibbonCustomizationAddIn.cs) as follows:

 
demoDropDown.ToolTip = new MapInfoRibbonToolTip
{
ToolTipDescription = "Demo Dropdown Tooltip Description",
ToolTipText = "Demo Dropdown Tooltip Text",
ToolTipDisabledText = "Demo Dropdown Tooltip Description",
Placement = PlacementMode.Bottom,
VerticalOffSet = -5,
HorizontalOffSet = 30
};

Here, the properties for Placement, VerticalOffSet and HorizontalOffset, following the conventional values that we use for other ribbon tooltips. This adjusted the placement appropriately.

Here is the definition of PlacementMode. If using the MapBasic interface, the integer placement value would map to one of the following enums

 
  /// <summary> 
  /// Describes the placement of where a <see cref="T:System.Windows.Controls.Primitives.Popup"/> control appears on the screen. 
  /// </summary> 
  [Localizability(LocalizationCategory.None, Readability = Readability.Unreadable)] 
  public enum PlacementMode 
  { 
    Absolute, 
    Relative, 
    Bottom, 
    Center, 
    Right, 
    AbsolutePoint, 
    RelativePoint, 
    Mouse, 
    MousePoint, 
    Left, 
    Top, 
    Custom, 
  }

While the guidance here is correct, it is not yet fully supported. This is raised under a defect under MIPRO-72165.

Resolution

UPDATED: September 28, 2017
The patch for MapInfo Pro 15.2.2 64-bit resolves this issue.