headers/
headers.rs

1use fltk::{
2    app,
3    prelude::{GroupExt, WidgetExt},
4    window,
5};
6use fltk_table::{SmartTable, TableOpts};
7
8fn main() {
9    let app = app::App::default().with_scheme(app::Scheme::Gtk);
10    let mut wind = window::Window::default().with_size(800, 600);
11
12    let mut table = SmartTable::default()
13        .with_size(790, 590)
14        .center_of_parent()
15        .with_opts(TableOpts {
16            rows: 30,
17            cols: 15,
18            ..Default::default()
19        });
20
21    wind.end();
22    wind.show();
23
24    for i in 0..30 {
25        table.set_row_header_value(i, &(i + 100).to_string());
26    }
27
28    for i in 0..15 {
29        table.set_col_header_value(i, &i.to_string());
30    }
31
32    app.run().unwrap();
33}