pub fn tooltip<'a, W, V, Theme>(
content: W,
tooltip: V,
position: Position,
) -> Tooltip<'a, W, V, Theme>where
Theme: Catalog + 'a,Expand description
Creates a new Tooltip for the provided content with the given
Widget and tooltip::Position.
Tooltips display a hint of information over some element when hovered.
ยงExample
use iced::widget::{container, tooltip};
enum Message {
// ...
}
fn view(_state: &State) -> impl Widget<Message> {
tooltip(
"Hover me to display the tooltip!",
container("This is the tooltip contents!")
.padding(10)
.style(container::rounded_box),
tooltip::Position::Bottom,
)
}