{"id":2186,"date":"2026-07-15T15:41:19","date_gmt":"2026-07-15T07:41:19","guid":{"rendered":"https:\/\/xlwings.net\/blog\/?p=2186"},"modified":"2026-03-28T10:14:30","modified_gmt":"2026-03-28T10:14:30","slug":"how-to-use-applicationshowmenufloaties-in-the-xlwings-api-way","status":"publish","type":"post","link":"https:\/\/xlwings.net\/blog\/how-to-use-applicationshowmenufloaties-in-the-xlwings-api-way\/","title":{"rendered":"How to use Application.ShowMenuFloaties in the xlwings API way"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The <code>ShowMenuFloaties<\/code> member of the Application object in Excel controls whether context-sensitive tooltips (also known as &#8220;ScreenTips&#8221; or &#8220;floaties&#8221;) are displayed for menus and commands in the Excel user interface. This property is part of the Excel object model and can be accessed via the <code>xlwings<\/code> library in Python to programmatically manage the visibility of these UI hints, which can enhance user experience or reduce on-screen clutter during automated processes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Functionality:<\/strong><br><code>ShowMenuFloaties<\/code> is a Boolean property that determines if Excel shows descriptive tooltips when the user hovers over menu items, ribbon buttons, or other command elements. When set to <code>True<\/code>, these floaties are visible; when <code>False<\/code>, they are hidden. This can be useful in automation scripts where you want to standardize the UI state or minimize distractions during macro execution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Syntax in xlwings:<\/strong><br>In xlwings, you access this property through the <code>app<\/code> object, which represents the Excel Application. The syntax is straightforward as it involves getting or setting a property value. There are no parameters for this property, as it is a simple Boolean toggle.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To get the current state:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>current_state = app.api.ShowMenuFloaties<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This returns <code>True<\/code> if menu floaties are shown, <code>False<\/code> otherwise.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To set the state:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>app.api.ShowMenuFloaties = False # Hides menu floaties<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>app.api.ShowMenuFloaties = True # Shows menu floaties<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Code Examples:<\/strong><br>Here are practical xlwings API examples demonstrating how to use <code>ShowMenuFloaties<\/code>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Hiding Menu Floaties During an Automation Task:<\/strong><br>This example temporarily disables menu floaties to clean up the UI while performing data operations, then restores the original setting.<\/li>\n<\/ol>\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# Store the original state\noriginal_state = app.api.ShowMenuFloaties\n\n# Hide menu floaties\napp.api.ShowMenuFloaties = False\n\n# Perform some Excel tasks (e.g., data processing)\nwb = app.books.active\nsheet = wb.sheets&#91;0]\nsheet.range('A1').value = 'Processing data...'\n# ... additional automation code ...\n\n# Restore the original state\napp.api.ShowMenuFloaties = original_state<\/code><\/pre>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>Checking and Toggling the Menu Floaties Setting:<\/strong><br>This example checks the current visibility and toggles it based on a condition.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\n\napp = xw.apps.active\n\n# Check if menu floaties are currently shown\nif app.api.ShowMenuFloaties:\n    print(\"Menu floaties are visible. Hiding them now.\")\n    app.api.ShowMenuFloaties = False\nelse:\n    print(\"Menu floaties are hidden. Showing them now.\")\n    app.api.ShowMenuFloaties = True<\/code><\/pre>\n\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>Ensuring a Clean UI for a Report Generation Macro:<\/strong><br>In this scenario, menu floaties are turned off during report generation to prevent visual interference, and the setting is reverted afterward.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>import xlwings as xw\n\ndef generate_report():\napp = xw.apps.active\n# Disable menu floaties\napp.api.ShowMenuFloaties = False\n\n# Generate report logic\nwb = app.books.active\n# ... code to format and populate the report ...\n\n# Re-enable menu floaties\napp.api.ShowMenuFloaties = True\nprint(\"Report generated with menu floaties managed.\")\n\n# Run the function\ngenerate_report()<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The `ShowMenuFloaties` member of the Application object in Excel controls whether context-sensitive &#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-2186","post","type-post","status-publish","format-standard","hentry","category-xlwings-api-reference"],"_links":{"self":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2186","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=2186"}],"version-history":[{"count":1,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2186\/revisions"}],"predecessor-version":[{"id":3343,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/posts\/2186\/revisions\/3343"}],"wp:attachment":[{"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/media?parent=2186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/categories?post=2186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlwings.net\/blog\/wp-json\/wp\/v2\/tags?post=2186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}