Gtk.Stack is a container which allows visibility to one of its child at a time. Gtk.Stack does not provide any direct access for users to change the visible child. Instead, the
Gtk.StackSwitcher widget can be used with
Gtk.Stack to obtain this functionality.
Gtk.Stack transitions between pages can be done by means of slides or fades. This can be controlled with
Gtk.StackSwitcher widget acts as a controller for a
Gtk.Stack ; it shows a row of buttons to switch between the various pages of the associated stack widget. The content for the buttons comes from the child properties of the
Follow below steps:
- import GTK+ 3 module.
- Create main window.
- Implement Stack.
- Implement Button.
- Implement Label.
- Implement StackSwitcher.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.