Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8098725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:09:54+00:00 2026-06-05T22:09:54+00:00

I was looking at this post: https://stackoverflow.com/a/2262200 and I have a very similar setup

  • 0

I was looking at this post: https://stackoverflow.com/a/2262200 and I have a very similar setup in the little thing I’m coding up. My question is, once the entrycompletion finishes, and the entry box has the url, how do I get that url from the completion into a variable? entry.get_text() doesn’t seem to work, and everything else I try just seems to give me an object or address. Here is the quote from the above link if you don’t feel like clicking.

# simplified example from the tutorial
import gtk

urls = [
    'http://www.google.com',
    'http://www.google.com/android',
    'http://www.greatstuff.com',
    'http://www.facebook.com',
    ]
liststore = gtk.ListStore(str)
for s in urls:
    liststore.append([s])

completion = gtk.EntryCompletion()
completion.set_model(liststore)
completion.set_text_column(0)

entry = gtk.Entry()
entry.set_completion(completion)

# boilerplate
window = gtk.Window()
window.add(entry)

window.connect('destroy', lambda w: gtk.main_quit())
window.show_all()
gtk.main()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:09:56+00:00Added an answer on June 5, 2026 at 10:09 pm

    The following variant of your code works for me.

    # simplified example from the tutorial
    import gtk 
    
    def on_match_selected(completion, treemodel, treeiter):
      print treemodel[treeiter][completion.get_text_column()]
    
    urls = [ 
        'http://www.google.com',
        'http://www.google.com/android',
        'http://www.greatstuff.com',
        'http://www.facebook.com',
        ]   
    liststore = gtk.ListStore(str)
    for s in urls:
        liststore.append([s])
    
    completion = gtk.EntryCompletion()
    completion.set_model(liststore)
    completion.set_text_column(0)
    
    completion.connect('match-selected', on_match_selected)
    
    entry = gtk.Entry()
    entry.set_completion(completion)
    
    # boilerplate
    window = gtk.Window()
    window.add(entry)
    
    window.connect('destroy', lambda w: gtk.main_quit())
    window.show_all()
    gtk.main()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking at this documentation page for LinkedIn API:https://developer.linkedin.com/documents/profile-api They have an example
I was looking at this post by Jeremy Hodge http://xpagesblog.com/XPagesHome.nsf/Entry.xsp?documentId=88065536729EA065852578CB0066ADEC With Event handlers and
Looking in this StackOverflow question it uses the following to send emails: System.Net.Mail.SmtpClient Is
Like the subject of this post suggests, I am looking at developing a suite
Not sure if this is the correct place to post, But looking at the
looking at this example of the jquery ui slider http://jqueryui.com/demos/slider/#steps i want to be
I am looking for a very simple way to post status updates to a
I've just seen this library https://github.com/technomancy/clojure-http-client with this snippet of code on the README
I have question about the beta Open Graph stuffs. The documentation I am looking
I have a Facebook page at https://www.facebook.com/xxxx and a web site at http://xxxx.com .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.