Python Forum
Gtk.EntryCompletion, get all suggestions, not only beginning with entered string.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gtk.EntryCompletion, get all suggestions, not only beginning with entered string.
#1
Hey there,

Have a Gtk.EntryCompletion connected to a textbox like this:
liststore = Gtk.ListStore(str)
f = open("vogelarten_dt.info", 'r').readlines()
for item in f:
    liststore.append([item[:-1]])

self.entrycompletion = Gtk.EntryCompletion()
self.entrycompletion.set_model(liststore)
self.entrycompletion.set_text_column(0)

self.entry = self.builder.get_object('Tbo_Species')
self.entry.set_completion(self.entrycompletion)
If i type something into my TextEntry, i got all suggestions from liststore, beginning with the entered string.
So if I type "bi", i get suggestions like "Bienenfresser", "Birkhuhn" or "Birkenzeisig".

How can I reconfigure the Gtk.EntryCompletion to also get suggestions not starting but containing "bi"? Have found a documentation about Python and GTK, but got no information about how to realize the described scenery.

Best Wishes,
TimeMen
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Detecting Buttons - Suggestions? RockBlok 3 795 Nov-29-2023, 11:54 AM
Last Post: RockBlok
  Tkinter Python: How to make sure tkSimpleDialog takes in No value entered rcmanu95 3 2,360 Aug-05-2020, 05:32 AM
Last Post: Yoriz
  [WxPython] the newbiest question since the beginning of time Klar 9 4,996 Dec-20-2017, 10:38 AM
Last Post: Larz60+
  [PyQt] Beginning in Qt NetCancer 2 4,422 Dec-03-2016, 11:51 PM
Last Post: Raures
  suggestions for a GUI client program Skaperen 1 3,742 Oct-21-2016, 05:49 PM
Last Post: Larz60+
  [Tkinter] Entry widget : unable to get the text entered dlemper 2 18,255 Oct-11-2016, 12:32 AM
Last Post: dlemper

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020