|
|
On Wednesday, September 9, 2020 at 3:07:23 PM UTC-5 holm.h...@gmail.com wrote:
Your approach with a combination of an Fl_Input and an
Fl_Table also seems interesting. Do you have the code posted somewhere ?
I am sorry Håvard, my code as currently written is proprietary. I am thinking to publish simplified versions of things I've done like this sometime in the future in a github repository. But no timeline yet.
But I was really trying to convey the concepts in what I did, in case it might be helpful to you in trying to do something similar (e.g., perhaps using a Fl_Browser instead of an Fl_Table?). It was straightforward. The greatest effort I expended was just implementing the filtering and table updating -- and that wasn't too bad actually, thanks to the nice way Fl_Table is implemented based on drawing cell contents via its draw_cell() method. My filter mechanism would ultimately select only a set of column data items and store their table row indexes in a std::set<int> variable. I would then access that variable to draw the corresponding full row contents within the draw_cell() method of my sub-classed Fl_Table. In other words, I needed to subclass Fl_Table, but not the Fl_Input widget. I just supplied a callback for the latter that drove the filtering as the user typed in characters.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/587f2444-9b03-435b-9267-19207ab351aen%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |