Skip to content
Advertisement

How to make a one-window program with GTK, python and glade?

I’d like to write a program that has one main window and if I click on a button it changes the content of the window (or something similar) and the user can go back after that to the “home page”. I’m using python3, gtk3 and glade on Ubuntu 19.04.

Here’s the example.glade XML file

JavaScript

And here’s the Python3 file

JavaScript

I’d like to change the window (but in the same window) to this when the button is pressed

JavaScript

Advertisement

Answer

Here is a possible solution using Gtk.Stack

The glade file:

JavaScript

The python file:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement