TTkToolTip🌶️

class TTkToolTip[source]🌶️

Bases: object

TTkToolTip:

Global tooltip manager for delayed display of help text.

This class manages tooltip behavior across the application, including:

  • Delayed tooltip display after hover timeout (configurable via TTkToolTip._toolTipTime)

  • Automatic positioning and sizing

  • Support for multiline tooltips

Note

This is a singleton-like class using class methods. Do not instantiate it directly.

Usage:

# Widgets set tooltips via their toolTip property
button = TTkButton(text="Click me", toolTip="This button does something")

# The tooltip system automatically handles display timing and positioning

Initialize self. See help(type(self)) for accurate signature.

Methods🌶️

static reset() None[source]🌶️

Cancel any pending tooltip display

This is typically called when the mouse leaves a widget or when the tooltip should be hidden.

static trigger(toolTip: str | TTkString) None[source]🌶️

Trigger a tooltip to be displayed after the configured delay

Parameters:

toolTip (TTkString) – The tooltip text to display (supports n for multiline)

TTkToolTip Attributes🌶️

toolTip

Current tooltip text to be displayed

toolTipTimer

Internal timer for delayed tooltip display