# Operator tooltip from layout text

The concept is to make a panel layout that emulates the workspace (screen) layout. While testing I have set all the buttons to be the Splash Screen operator.

An image of how this looks for five default workspaces Animation, General, UV Editing, Compositing and Scripting

so apart from nesting the layout is pretty much

    for a in context.screen.areas:
layout.operator("wm.splash", text=a.type)


The Mystery

At a loss to explain why some of the buttons display the button text as a tool tip, and some don't. 'OUTLINER' and 'PROPERTIES' always have the tooltip. Sometimes one 3d view in animation does and the other doesn't.

Any operator can be substituted for "wm.splash" and shows the same behaviour.

The only reference to "tooltip" in UILayout is for template list which I am not using.

• Isn't it just whether the text fits on the button? Ellipsized/clipped/overflowing texts get put in the tooltip. Side note: Do you have any ideas for controlling element size in .popup_menu()? Jul 11 at 4:59
• "OUTLINER", "PROPERTIES", and "IMAGE_EDITOR" get displayed in the tooltip because they don't fit on the operator button in any of the layouts. One of the "VIEW_3D"s in the animation box gets displayed only sometimes presumably because the left one barely fits, and gets ellipsized or not depending on window manager state. Consistency for the same string across the boxes is presumably coincidental. You can also confirm this behaviour by scaling any normal panel in Blender— The button label gets displayed in the tooltip when and only if its UI element becomes too small to fit the full text on it. Jul 11 at 16:30