FLTK logo

[fltk.general] Re: Search widget

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Search widget "holm.h... Sep 09, 2020  
 
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:
On Wednesday, September 9, 2020 at 8:19:50 AM UTC-5 holm.h...@gmail.com wrote:

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 ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.