Re: GTKCombo: autocomplete?




On Wednesday, May 19, 2004, at 08:58 PM, Daniel Kasak wrote:

What I can't figure, however, is:

a) How to pass the completion object a list of strings for the completion list

the completion checks for matches in the rows of a treemodel you provide. basically, create a list store with at least one column containing the strings, tell the completion to use that model ($completion->set_model ($model)) and tell it which column contains the strings ($completion->set_text_column ($colnumber)).

that's just from reading the description section at http://developer.gnome.org/doc/API/2.0/gtk/GtkEntryCompletion.html

b) What the Perl equivalent of the above C functions are

according to the principles outlined in the Gtk2::api manpage:

    GtkEntryCompletion => Gtk2::EntryCompletion
    gtk_entry_completion_new() => Gtk2::EntryCompletion->new()
gtk_entry_set_completion(entry, completion) => $entry->set_completion ($completion)

Is there any documentation ( or examples ) yet on using the GtkEntryCompletion object from Perl?

if you built your gtk2-perl against gtk+ 2.4, there should be a man page for Gtk2::EntryCompletion listing the methods you can call. the gtk-demo program (Gtk2/gtk-demo) contains an example of using the entry completion.


--
"the ternary operator makes it a bit less ugly."
    -- kaffee




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