rustfltk

How to display databases values with fltk widgets


I'm developing an application - written in rust, that registers items in a database, but I'm having trouble showing the data in a way that is visually good, I tried to use the Browser widget but it's not visually appealing. I have a struct Items that store name, quantity and price, and a vector of Items that stores the field values, how can I show the items stored in the database, and what is the best widget to do that?


Solution

  • Natural choice would be to use the Fl_Table and Fl_Table_Row classes in your project.

    Greg Ercolano has an example how to use them at https://www.seriss.com/people/erco/fltk/Fl_Table/ . In fact, he is the original author of these classes, later on they got into the FLTK itself...

    Do not be confused with the screenshot when you see those buttons inside the table. - He just wanted to demonstrate that you can put any Widget in Fl_Table cells.