Re: GTKCombo: autocomplete?



On Thu, May 13, 2004 at 06:24:33 -0400, muppet wrote:

On Thursday, May 13, 2004, at 05:50 AM, Jan Hudec wrote:

On Thu, May 13, 2004 at 14:09:18 +1000, Daniel Kasak wrote:
I realise that this is not strictly a PerlGTK questions, but maybe 
someone knows anyway.
I've got a GTKCombo box that I'm loading data into with  
$mycombo->set_popdown_strings(@list_of_companies).
The combo box will contain a list of all of our clients - it's a 
pretty large list.
Is it possible to have the combo box seek the closest match to what 
you type in the entry box ( yeah, like Access ).
...
Yes, you can. The GtkCombo contains a GtkEntry and GtkEntry has 
'insert-text' and 'delete-text' signals. There are also some 
facilities in Gtk to do completions, which should be faster than 
regexps (after all, C is still faster than perl). Actualy, it should 
be filed as Gtk bug if GtkCombo does not do autocompletion 
automaticaly.

well, you could file a missing feature bug on GtkCombo, but it would be 
ignored -- GtkCombo is deprecated as of gtk+ 2.4.0, in favor of 
GtkComboBox.

Hm, gtk 2.4 didn't make it to my system yet (unstable debian, updated
today) and so did not it's documentation.

-------------------------------------------------------------------------------
                                                 Jan 'Bulb' Hudec <bulb ucw cz>

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]