Skip to main content

Crate iced_table2

Crate iced_table2 

Source
Expand description

A table widget for iced 0.14.

This crate provides a Table widget that displays rows of data in columns with synchronized header, body, and optional footer scrolling. Columns can be interactively resized by dragging dividers, rows can be clicked and visually highlighted via single-row selection, header cells can be clicked to trigger sorting, and the table’s appearance is fully customizable via the Catalog trait.

§Getting started

  1. Define a column type that implements the Column trait.
  2. Create widget::Ids for the header, body, and (optionally) footer scrollables.
  3. Call table() to build the widget.
  4. In your update function, handle the on_sync message by scrolling the header and footer scrollables to the received offset so they stay aligned with the body.
use iced::widget;
use iced_table2::table;

let header_id = widget::Id::unique();
let body_id = widget::Id::unique();

let table = table(header_id, body_id, &columns, &rows, Message::TableSynced)
    .cell_padding(8)
    .min_width(600.0);

Re-exports§

pub use table::table;
pub use table::Table;

Modules§

table
Types for building and configuring a Table widget.

Traits§

Catalog
Controls the visual appearance of a Table.