|
|
Hi pdh...@compintensehpc.com,
Your approach with a combination of an Fl_Input and an
Fl_Table also seems interesting. Do you have the code posted somewhere ?
Best regards Håvard
onsdag 9. september 2020 kl. 21:08:01 UTC+2 skrev pdh...@compintensehpc.com:
Hello, I wonder if some of you have already written this:
I have a long list, and want to select one items. I would like to type in a text in a Fl_Input, when the text match a small number (~10) items I want the a window to pop up and the user can select one of the matching entries. Easier for the user, and typos will be eliminated.
Do any of you have written such a widget earlier ?
Best regards Håvard
For my needs, I once crafted a combination of an Fl_Input and an
Fl_Table (not actually placed together within a widget wrapper though).
The user types in the input widget and at each keystroke (which includes
the possibility of "wildcard" chars like '*', or even a backspace to
remove a previous character) a filter operation on the table rows is
performed. The filter operation is applied to a particular column that
the user has previously designated, with the condition that the values
in that column are already sorted (up or down). This is not an enterable
table (all cells have fixed content), and focus remains in the input
widget while typing is happening. At any time, the user can use the
mouse to select one or more of the filtered rows as presented in the
table. Of course, that does move focus from the input widget.
Perhaps counter-intuitive, but this combination has surprisingly good
performance on my Linux platform, even with many thousands of rows in
the table! Undoubtedly this is because the filtering is applied to
sorted column data. There is virtually no delay after a character is
typed into the input widget and the filter-selected rows are
(re)displayed in the table.
--
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/1676d0a7-6915-4686-ba43-3eec40b6d344n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |