Tooltip❖
kivydk.uix.abc.tooltip
Overview❖
Defines the abstract interface required for tooltip rendering widgets. Any widget used as a tooltip must implement this interface so that TooltipManager can update its content, size, position and visibility in a consistent and predictable way.
The interface does not impose any visual style or layout. Applications may provide their own tooltip widget implementations as long as the required methods are implemented.
Reference❖
- class TooltipTemplate(**kwargs)❖
Bases:
WidgetAbstract interface for tooltip widgets.
TooltipManager relies on this interface to interact with any tooltip widget in a consistent way. Custom tooltip widgets must provide the required methods, so they can be positioned, updated and shown correctly within the tooltip system.
- abstractmethod update_text(text: str, markup: bool = False) None❖
Update the tooltip’s displayed text.
Implementations should apply the text and prepare any internal layout changes required before sizing.
Called whenever TooltipManager resolves a tooltip message for the hovered widget.
- abstractmethod update_size() None❖
Recalculate the widget’s size based on its current content.
Implementations must update
widthandheightto reflect the actual rendered size.TooltipManager calls this after updating the text, so it can compute the correct placement for the tooltip before making it visible.