{"id":2190,"date":"2026-07-17T16:58:38","date_gmt":"2026-07-17T08:58:38","guid":{"rendered":"https:\/\/xlwings.net\/blog\/?p=2190"},"modified":"2026-03-28T10:17:07","modified_gmt":"2026-03-28T10:17:07","slug":"how-to-use-applicationshowtooltips-in-the-xlwings-api-way","status":"publish","type":"post","link":"https:\/\/xlwings.net\/blog\/how-to-use-applicationshowtooltips-in-the-xlwings-api-way\/","title":{"rendered":"How to use Application.ShowToolTips in the xlwings API way"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In the Excel object model, the <strong>Application.ShowToolTips<\/strong> property controls whether Excel displays ScreenTips for toolbar buttons. When enabled, hovering the mouse over a command button in the ribbon or toolbar will show a small descriptive text box. This can enhance user experience by providing quick guidance, especially in custom-built Excel applications or when distributing workbooks to less experienced users. From a developer&#8217;s perspective, managing this setting via xlwings allows you to ensure a consistent interface behavior programmatically, aligning with the application&#8217;s intended usability.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Syntax in xlwings:<\/strong><br>The property is accessed through the <code>xlwings.App<\/code> object, which corresponds to the Excel Application. In xlwings, you typically interact with the active application instance or create a new one. The property is a Boolean value.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\n\n# Connect to the active Excel instance\napp = xw.apps.active\n\n# Get the current ShowToolTips setting\ncurrent_setting = app.api.ShowToolTips\n\n# Set the ShowToolTips property\napp.api.ShowToolTips = True # or False<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here, <code>app.api<\/code> provides direct access to the underlying Excel Application object&#8217;s COM interface, allowing you to use the standard Excel VBA properties and methods. The <code>ShowToolTips<\/code> property accepts a Boolean: <code>True<\/code> turns on ScreenTips, <code>False<\/code> turns them off. Note that changes affect the entire Excel application, not just a specific workbook.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Code Examples:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Checking the Current Setting:<\/strong><br>This is useful for diagnostics or to conditionally adjust other settings based on the current state.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\napp = xw.apps.active\nif app.api.ShowToolTips:\n    print(\"ToolTips are currently enabled.\")\nelse:\n    print(\"ToolTips are disabled.\")<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Temporarily Disabling ToolTips:<\/strong><br>You might want to turn off ToolTips during a macro-intensive process to prevent visual distractions, then restore the original setting.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\napp = xw.apps.active\noriginal_setting = app.api.ShowToolTips\ntry:\n    app.api.ShowToolTips = False\n    # Perform tasks where ToolTips are not needed\n    # e.g., automated data processing\n    print(\"ToolTips disabled for operations.\")\nfinally:\n    app.api.ShowToolTips = original_setting\n    print(f\"ToolTips restored to {original_setting}.\")<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Ensuring ToolTips are Enabled for User Interaction:<\/strong><br>In a user-facing application, you might enforce ToolTips to be on to aid navigation.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\n# Start or connect to Excel\napp = xw.App(visible=True) # New instance, visible\napp.api.ShowToolTips = True\n# Open a workbook and perform tasks\nwb = app.books.open('example.xlsx')\n# ... additional code\n# The user will see ToolTips throughout the session<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Excel object model, the **Application.ShowToolTips** property controls whether Excel displays&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-2190","post","type-post","status-publish","format-standard","hentry","category-xlwings-api-reference"],"_links":{"self":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/comments?post=2190"}],"version-history":[{"count":2,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2190\/revisions"}],"predecessor-version":[{"id":3349,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2190\/revisions\/3349"}],"wp:attachment":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/media?parent=2190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/categories?post=2190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/tags?post=2190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}