

Graph.draw_line((-SIZE_X, 0), (SIZE_X, 0)) # axis lines
#SG PROJECT WINDOWS HOW TO#
This demo shows the developer how to use the Graph widget. One such example can be found in Demo_Graph_Element_Sine_Wave.py. PySimpleGUI also supports creating graphs. Then you create a Window object and pass in the layout, which is your list of lists of Elements or widgets. You can also see that this demo uses lists for generating the menus too. PySimpleGUI lays out their widgets by using Python lists.

'The button clicked was ""'.format(event), Window = sg.Window('Everything bagel', layout,ĭefault_element_size=(40, 1), grab_anywhere=False) Sg.InputText('Default Folder'), sg.FolderBrowse()], [sg.Text('Your Folder', size=(15, 1), justification='right'), Sg.Col(column1, background_color='lightblue')]]) Sg.MLine(default_text='A second multi-line', size=(35, 3))], [sg.MLine(default_text='This is the default Text should you decide not to type anything', size=(35, 3)), Sg.Radio('My second Radio!', "RADIO1")]], title='Options', Sg.CBox('My second checkbox!', default=True)], ,
#SG PROJECT WINDOWS CODE#
Let's take a quick look at the code for this demo:Įxample of (almost) all widgets, that you can use in PySimpleGUI. This is what the demo looks like when you run it: PySimpleGUI has wrapped all of Tkinter's core widgets, but not the ttk widgets. PySimpleGUI has a nice little demo called Demo_All_Widgets.py that demonstrates almost all the widgets that PySimpleGUI supports currently. In this article, you will see a small sampling of the demos from the project that will give you some idea of what you can do with PySimpleGUI. In addition, there are a couple of games and other tiny applications too, such as a version of Pong and the Snake game. The demos cover all the basic widgets as far as I can tell and they also cover the recommended design patterns for the package.

The PySimpleGUI project has a lot of interesting demos included with their project that you can use to learn how to use PySimpleGUI.
