1use fltk::{
2 app, enums,
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()
14 .with_size(790, 590)
15 .center_of_parent()
16 .with_opts(TableOpts {
17 rows: 30,
18 cols: 30,
19 editable: true,
20 ..Default::default()
21 });
22
23 wind.end();
24 wind.show();
25
26 table.set_cell_value(3, 4, "another");
28 assert_eq!(table.cell_value(3, 4), "another");
29
30 wind.set_callback(move |_| {
32 if app::event() == enums::Event::Close {
33 app.quit();
34 }
35 });
36
37 app.run().unwrap();
38}