ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Framework.Contracts Namespace / PlugIn Class / Tooltip Property
Example

In This Topic
    Tooltip Property (PlugIn)
    In This Topic
    Gets or sets a brief description of the command that appears in a small pop-up window when a user pauses the mouse pointer over an element, such as over a Button.
    Syntax
    Public Property Tooltip As String
    public string Tooltip {get; set;}
    Remarks

    The Tooltip will by default return the tooltip text entered in its DAML declaration. Use this property if you need to change the tooltip at run-time.

    Example
    <button id="acme_rename" caption="Rename" className="RenameProjectItem" smallImage="/Images/GenericPencil16.png">
      <tooltip heading="Rename">Rename the project item.
        <disabledText>No project loaded.</disabledText>
      </tooltip>
    </button>
    Customize the disabledText property of a button or tool
    {
      //Set the tool's loadOnClick attribute to "false" in the config.daml. 
      //This will allow the tool to be created when Pro launches, so that the disabledText property can display customized text at startup.
      //Remove the "condition" attribute from the tool. Use the OnUpdate method(below) to set the enable\disable state of the tool.
      //Add the OnUpdate method to the tool.
      //Note: since OnUpdate is called very frequently, you should avoid lengthy operations in this method 
      //as this would reduce the responsiveness of the application user interface.
      {
        bool enableState = true; //TODO: Code your enabled state  
        bool criteria = true;  //TODO: Evaluate criteria for disabledText  
    
        if (enableState)
        {
          Enabled = true;  //tool is enabled  
        }
        else
        {
          Enabled = false;  //tool is disabled  
                            //customize your disabledText here  
          if (criteria)
            DisabledTooltip = "Missing criteria 1";
        }
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also