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 7995919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:33:48+00:00 2026-06-04T14:33:48+00:00

I develop in python with glade and pygtk since 3 months, but even before

  • 0

I develop in python with glade and pygtk since 3 months, but even before I had time to get used to it, it was already obsolete.

Using Archlinux, my system is constantly up to date, so I am forced to use gtk3 even if I found it a bit lacking of features compared to gtk2.

So I decided to switch to pygobject. Unfortunately, the documentation is not complete.

I successfully upgraded my glade file and my python code to the new system, but one error subsists.

In one of my programs, I have a combobox with an entry.
I use to call the method get_active_text() to get the content of the entry, regardless if it was selected from the combobox or entered by the user.

This method does not exist any more (I suppose, because it gave me an error) so I use this instead :

def get_license(self):
    #return self.combobox_license.get_active_text()
    tree_iter = self.combobox_license.get_active_iter()
    if tree_iter != None:
        model = self.combobox_license.get_model()
        return model[tree_iter][0]
    else:
        entry = self.combobox_license.get_child()
        return entry.get_text()

As you can see the old code is commented.

This code works, but I have an odd issue :
I can’t use the entry !

I am able to select the text from the combobox, but the entry is not usable. I can select, but I can’t type in it.

Is this a new behavior I need to activate somewhere ?
With the gtk2 version of the program, I don’t have any problem.

Here is the part in my glade file that describes the combobox entry :

  <object class="GtkComboBox" id="combobox_license">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="model">liststore_license</property>
    <property name="has_entry">True</property>
    <property name="entry_text_column">0</property>
    <signal name="changed" handler="on_combobox_license_changed" swapped="no"/>
    <child>
      <object class="GtkCellRendererText" id="cellrenderertext_license"/>
    </child>
    <child internal-child="entry">
      <object class="GtkEntry" id="combobox-entry2">
        <property name="can_focus">False</property>
        <property name="buffer">entrybuffer1</property>
      </object>
    </child>
  </object>

I created a liststore with one column of type gchararray containing the text.
The cell is rendered by the GtkCellRenderer (but the property “text” of the cellrenderer is not defined, because if I define it to 0 (the gchararray), I get the text twice !)

I thought adding an entrybuffer would help, but it does not change anything.

EDIT : I found the solution : can_focus was false for the embedded entry.
Now it works, without the need to an entrybuffer.

I found the solution before posting this, but I post it in case other users have this issue too.

  • 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-04T14:33:50+00:00Added an answer on June 4, 2026 at 2:33 pm

    Change the can_focus property of the embedded entry of the combobox to true.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is Python strictly interpreted at run time, or can it be used to develop
I want to develop a GAE application using python, but I fear that Google
I mostly develop in PHP, but I'm using Python and Ruby more and more.
I'm using python to develop a web app. I defined both get and post
Can python be used as a language to develop browser based games? Like we
I develop a Python-based drawing program, Whyteboard . I have tools that the user
I want to learn C++ so that i can develop C++ Python modules for
In python how can i develop this algorithm to find common patterns in a
In a Python system for which I develop, we usually have this module structure.
I develop open-source project in Python and I want it to be easy accessible

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.