Iced - Unable to create a grid widget
⚓ Rust 📅 2026-03-19 👤 surdeus 👁️ 7I am trying to learn layout in iced and ran across the grid widget. I would like to use it but am having a problem. In the example below I get the error "consider specifying the generic arguments '::<Message, Theme, Renderer>`. I do not know how to do this. Any input will be appreciated.
widget::grid::Grid::from_vec(
// consider specifying the generic arguments: `::<Message, Theme, Renderer>`
vec![
widget::text("Cell 1:1").into(),
widget::text("Cell 1:2").into(),
widget::text("Cell 2:1").into(),
widget::text("Cell 2:2").into(),
]
)
.columns(2);
3 posts - 3 participants
🏷️ Rust_feed