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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:04:05+00:00 2026-06-15T01:04:05+00:00

In a PyGObject project, I am trying to remove a widget from a GtkStatusbar

  • 0

In a PyGObject project, I am trying to remove a widget from a GtkStatusbar using the gobject-introspection binding of gtk_container_remove ().

Normally when working with the GObject Introspection Python bindings, the method name is the same as the C function name, minus the “type prefix” and taking one less explicit argument. For example, I call gtk_box_pack_end () to add the widget that I later want to remove:

statusbar.pack_end(widget, False, True, 0)

When I try to remove the widget via statusbar.remove(widget), I see:

...
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 43, in function
    return info.invoke(*args, **kwargs)
TypeError: remove() takes exactly 3 arguments (2 given)

One of the arguments is the implicit self and the other two arguments are apparently supposed to be numbers.

Here is the method’s GIR:

<method name="remove" c:identifier="gtk_container_remove">
  <return-value transfer-ownership="none">
    <type name="none" c:type="void"/>
  </return-value>
  <parameters>
    <parameter name="widget" transfer-ownership="none">
      <type name="Widget" c:type="GtkWidget*"/>
    </parameter>
  </parameters>
</method>

How do I call the gtk_container_remove () function in PyGObject?

  • 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-15T01:04:07+00:00Added an answer on June 15, 2026 at 1:04 am

    Gtk.Statusbar override the remove function with another one with a different signature. You could try to destroy the widget, the container, the statusbar, will be notified and it will remove the widget, hoping you don’t need it anymore.

    Otherwise you could try: Gtk.Container.remove(statusbar, widget).

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

Sidebar

Related Questions

I'm trying to write simple graphic editor using PyGObject and python 3. I need
How can I get a transparent cursor using Python GTK3 and pyGObject. I have
I have a project with Python, PyGObject (Gtk 3), and GStreamer (0.11) I have
I have the following Python 2.7/PyGObject 3.0/PyGST 0.10 module: from gi.repository import Gtk, Gdk,
I am trying to embed some python in my pet project. I have reduced
I am trying to create python bindings to a vala library using the following
I've been trying to install PyGObject using a variety of methods. First, using apt-get
Is there anyway to discover the python value of a PyObject* from a corefile
We are trying to load a pdf file in web browser using pdfobject javascript
I am new to Gtk+ development, and am trying to write an app using

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.