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

  • Home
  • SEARCH
  • 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 6611573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:59:14+00:00 2026-05-25T19:59:14+00:00

I am facing the problem to need tabs in a pygtk app. Pretty much

  • 0

I am facing the problem to need tabs in a pygtk app. Pretty much just like gedit has, but without any per-child widget content.
I’ve come across gtk.Notebook, but that requires me to put a widget for each tab, which I don’t want.

The reason is, that I have one widget, but would only like to updates its content based on which tab is selected.

Any hints on how to do that?
My idea so far would be to just add some invisible widget for each tab and then connect to the select-page signal. Which widget could I use as invisible widget, or is there a better/alternative way of achieving my goal?

  • 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-05-25T19:59:14+00:00Added an answer on May 25, 2026 at 7:59 pm

    The invisble widget idea works. But not with gtk.Invisible (this just crashes), but with gtk.HBox() or any other thing that seems empty.

    self.notebook.append_page(gtk.HBox(), gtk.Label("title"))
    

    Now if I want to display stuff inside the tab actually, I can use reparent to move the widget to the current tab like this.

    class Tab(gtk.HBox):
        def __init__(self, child):
            self.child = child
    
    self.notebook.append_page(Tab(myWidget), gtk.Label("title"))
    
    def pageSelected(self, notebook, page, pagenum):
        box = notebook.get_nth_page(pagenum)
        box.child.reparent(box)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently use a ViewSwitcher in my app but now I'm facing a problem
I am facing problem. I need to build one app in two ways, first
I m facing big problem With Application Termination State.In My app need to Satisfied
I'm facing a problem when I need to distribute my java application, created using
I'm facing the following problem: in the controller I select the data I need
I am facing a problem. I would like to localize my action names in
I am facing a problem in my Spring learning and would need some help.
i am facing some problem with files with huge data. i need to skip
I'm facing a problem while working with iFrames. What I need to do is,
I'm facing a problem using IE here. I need to insert a form on

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.