Skip to content

Creating a simple graphical user interface (GUI) that works across multiple platforms can be complicated. But it doesn't have to be that way. You can use Python and the PySimpleGUI package to create nice-looking user interfaces that you and your users will enjoy! PySimpleGUI is a new Python GUI library that has been gaining a lot of interest rec…

Notifications You must be signed in to change notification settings

Silvokyda/PysimpleGui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PysimpleGui

Creating a simple graphical user interface (GUI) that works across multiple platforms can be complicated. But it doesn't have to be that way. You can use Python and the PySimpleGUI package to create nice-looking user interfaces that you and your users will enjoy! PySimpleGUI is a new Python GUI library that has been gaining a lot of interest recently.

Installing PySimpleGUI

PySimpleGUI is a Python package that enables Python programmers of all levels to create GUIs. You specify your GUI window using a "layout" which contains widgets (they're called "Elements" in PySimpleGUI). Regardless of the O.S [Windows,Mac or Linux], on your python interpreter, we will install the package.

Open The Command Editor window

  • press win plus r on your keyboard to open up the shorcut menu bar and type in cmd
  • Run the command Pip Install PySimpleGUI
  • Pip install PySimpleGUI
    

    Setting Up Simple Elements

  • To Create a Window, you should use the following code:
  • 1. import PySimpleGUI as sg
    2. sg.Window(title="Hello Amigo", layout=[[]], margins=(200,100)).read()
    

  • Run your code to output a window. Depending on the O.S you are using, the window pup ups will differ.
  • Adding Buttons to the Window
  • 1. import PySimpleGUI as sg 
    2.
    3. layout = [
    4.	[sg.Text("Hello from silvans")],
    5.	[sg.Button("Hi!")]
    6.]
    7.
    8.window = sg.Window("Demo", layout, margins=(200,100))
    9.
    10.while True:
    11.	event, values = window.read()
    12.	if event == "Hi!" or event == sg.WIN_CLOSED:
    13.		break
    14.window.close()
    

  • You can customize the buttons giving them diffrent instructions
  • About

    Creating a simple graphical user interface (GUI) that works across multiple platforms can be complicated. But it doesn't have to be that way. You can use Python and the PySimpleGUI package to create nice-looking user interfaces that you and your users will enjoy! PySimpleGUI is a new Python GUI library that has been gaining a lot of interest rec…

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

     
     
     

    Languages