You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add word autocompletion to SearchEntry.
It's possible for Entry widget.
So I've tried to do something like this:
` let entry_field = gtk::Entry::new();
// Create an EntryCompletion widget
let completion_words = gtk::EntryCompletion::new();
// Use the first (and only) column available to set the autocompletion text
completion_words.set_text_column(0);
// how many keystrokes to wait before attempting to autocomplete?
completion_words.set_minimum_key_length(1);
// whether the completions should be presented in a popup window
completion_words.set_popup_completion(true);
let list_model = create_list_model_for_completion();
completion_words.set_model(Some(&list_model));
entry_field.set_completion(Some(&completion_words));
self.search_entry.set_key_capture_widget(Some(&entry_field));`
But it didn't work. It doesn't show any popup window with suggested words.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to add word autocompletion to SearchEntry.
It's possible for Entry widget.
So I've tried to do something like this:
` let entry_field = gtk::Entry::new();
But it didn't work. It doesn't show any popup window with suggested words.
Beta Was this translation helpful? Give feedback.
All reactions