Tooltip
Provide text labels which help explain the function of a button or other user interface action.
Properties
bgcolor- Background color of the tooltip.decoration- The background decoration of this tooltip.enable_feedback- WhenTrue(default) the tooltip should provide acoustic and/or haptic feedback.exclude_from_semantics- Whether the tooltip's message should be excluded from the semantics tree.exit_duration- The length of time that the tooltip will be shown after a long press is released or a tap is released or mouse pointer exits the control.margin- The empty space that surrounds the tooltip.message- The text to display in this tooltip.mouse_cursor- The cursor for a mouse pointer when it enters or is hovering over the content.padding- The amount of space by which to inset the tooltip's content.prefer_below- Whether the tooltip defaults to being displayed below the control.show_duration- The length of time that the tooltip will be shown after a long press is released (if triggerMode isTooltipTriggerMode.LONG_PRESS) or a tap is released (if triggerMode isTooltipTriggerMode.TAP).size_constraints- Defines the constraints on the size of this tooltip.tap_to_dismiss- Whether the tooltip can be dismissed by tapping on it.text_align- How the message of the tooltip is aligned horizontally.text_style- TheTextStyleto use for the message of the tooltip.trigger_mode- The mode of the tooltip's trigger.vertical_offset- The vertical gap between the control and the displayed tooltip.wait_duration- The length of time, in milliseconds, that a pointer must hover over a tooltip's control before the tooltip will be shown.
Properties
bgcolorclass-attributeinstance-attribute
bgcolor: ColorValue | None = NoneBackground color of the tooltip.
decorationclass-attributeinstance-attribute
decoration: BoxDecoration | None = NoneThe background decoration of this tooltip.
If None, TooltipTheme.decoration is used.
If that is also None, a default decoration will be picked based
on the current theme mode:
In light theme mode:
ft.BoxDecoration(
border_radius=ft.BorderRadius.all(4.0),
bgcolor=ft.Colors.with_opacity(0.9, ft.Colors.GREY_700),
)
In dark theme mode:
ft.BoxDecoration(
border_radius=ft.BorderRadius.all(4.0),
bgcolor=ft.Colors.with_opacity(0.9, ft.Colors.WHITE),
)
enable_feedbackclass-attributeinstance-attribute
enable_feedback: bool | None = NoneWhen True (default) the tooltip should provide acoustic and/or haptic feedback.
For example, on Android a tap will produce a clicking sound and a long-press will produce a short vibration, when feedback is enabled.
exclude_from_semanticsclass-attributeinstance-attribute
exclude_from_semantics: bool | None = FalseWhether the tooltip's message should be excluded from the semantics tree.
exit_durationclass-attributeinstance-attribute
exit_duration: DurationValue | None = NoneThe length of time that the tooltip will be shown after a long press is released or a tap is released or mouse pointer exits the control.
If None, TooltipTheme.exit_duration is used.
If that's is also None, defaults to 0 milliseconds - no delay.
marginclass-attributeinstance-attribute
margin: MarginValue | None = NoneThe empty space that surrounds the tooltip.
If None, TooltipTheme.margin is used.
If that's is also None, defaults to Margin.all(0.0).