Skip to main content

pin

Function pin 

Source
pub fn pin<W>(content: W) -> Pin<W>
Expand description

Creates a new Pin widget with the given content.

A Pin widget positions its contents at some fixed coordinates inside of its boundaries.

ยงExample

use iced::widget::pin;
use iced::Fill;

enum Message {
    // ...
}

fn view(state: &State) -> impl Widget<Message> {
    pin("This text is displayed at coordinates (50, 50)!")
        .x(50)
        .y(50)
}