Web Analytics Made Easy - Statcounter
Skip to content

All Elements

This program is a slightly modified version of the Demo Program found in the PySimpleGUI repo:

Demo_All_Elements_Simple.py

The view of this window here on Trinket looks a little different than the code when run on Windows

Trinket

SNAG-1569

Windows 10

image

Titlebar and Menubar

The thing I want to draw your attention to is the Titlebar and the Menubar.

Because Trinket does not provide a Titlebar (it's the operating system's job to do this), PySimpleGUI provides one for you automatically. PySimpleGUI doesn't automatically switch your Menubar to a MenubarCustom which is what you need to use on Trinket for the 2 to match. The code in this Trinket has been modified to add the custom Menubar for you.

The code

This demo was written to show you the "pallet of elements" that you have available to paint your GUI window with. It doesn't tell the full story however as you can expand these GREATLY by using PIL, the graph element, images for buttons, etc. What it does do is list all of the elements using 1 line of code per element. It can't get much simpler than that.

Theme Previewer

This proram has a secondary function... you can see what all of the elements look like using the many PySimpleGUI Themes. Choose a new theme from the Combo element shown and the window will be remade with the new theme.

For example, I chose the "Dark Grey 11" theme and was shown this window:

SNAG-1570