System Info

GUI Properties

  • Python File Export - the location your GUI will be exported to. Select the file icon to use a file explorer window, where you can save your file.

  • Grid Colour - the background colour of your screen grid, as a 6 digit hex code. Use the colour picker for a basic colour, or input your own unique hex colour

  • Parent Script - the main python script you will import your GUI to. This parent script must be formatted in a particular way. See "Formatting your Parent Script"

  • Grid Size - the size of the grid your GUI sits in (x, y).

  • Window size - the size in pixels your GUI window will run in when completed (x, y). These pixels are not actual pixels but are 'Tkinter pixels', meaning the window should take up a similar area of the screen across multiple displays - even at different resolutions.

  • Hierarchy determines whether the screen is the main window or is a child window. In Python, these are a Tk() and Toplevel() window respectively. You can only have one main window for each program.

  • Background image is optional and is the image that runs in the background behind the screen. The image can be an absolute path or a relative path. Background images remain unique for every page if used in a group.

  • DPI aware enables scaling for high DPI screens. Text will be crisper and images will be sharper.

Formatting Your Parent Script

The parent script is what drives all the logic of your program. It is what contains all your code. GUI Pie has been written in a way so that the GUI is separate from your parent script as much as possible, so that at any time in the development process you can add in this GUI with little hassle.

Import: Every GUI file you import needs an import statement at the top of your python file.

from <gui name> import <gui name>

For a GUI file named gui, this would look like from gui import gui

One of these is needed for every gui file. If you have multiple screens, you will have multiple of these.

Run: The following is written for the main window only. The run statement must be the final line of the file.

<gui name>.run()

For a GUI file named gui, this would look like gui.run()

GUI Functions

  • Show a particular screen - <gui name>.show()E.g gui.show()

  • Hide a particular screen - <gui name>.hide()E.g gui.hide()