Closed jlgerber closed 2 years ago
Regarding exposing the table field, fltk_table::SmartTable basically auto derefs into an fltk::table::Table. You just have to import the TableExt trait and you can use any of the table methods.
use fltk::prelude::TableExt;
let mut table = fltk_table::SmartTable::default();
table.set_col_width_all(200); // or table.set_col_width(some_column, 200);
I'm not sure what you mean by padding? Do you mean between cells? I don't think FLTK supports that.
Yes. I just noticed the Deref and DerefMut impls. I should have looked first. Sorry for the noise.
By padding I mean padding in the "box model" sense. I guess I should look into adding the request to the c++ project. Layout is the one area where FLTK shows its age. However, it looks like this may get addressed somewhat in 1.4
On an unrelated note, I worked at Digital Domain for years, where FLTK was written for Nuke, so I am quite amused by the fact that I am now writing FLTK code for Rust. What's old is new again, as they say...
Thank you for all of the work on the Rust port. Rust really needs a good GUI toolkit, and this is one of the most reliable ones available.
Thank you. That’s nice to hear :)
creating and populating a smart table is straightforward. However, I do not see any way of setting the size of a cell. I would love a helper method that would reset the size of a cell based on the contents of the cell. And / or a helper method to resize all the cells in a column or whole table to fit their contents. Also some control over padding would be nice.
Is making the table field public a viable solution?