Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

callbacks to function pysimplegui

import PySimpleGUI as sg

def func(message):
    print(message)

layout = [[sg.Button('1'), sg.Button('2'), sg.Exit()] ]

window = sg.Window('ORIGINAL').Layout(layout)

while True:             # Event Loop
    event, values = window.Read()
    if event in (None, 'Exit'):
        break
    if event == '1':
        func('Pressed button 1')
    elif event == '2':
        func('Pressed button 2')
window.Close()
Comment

PREVIOUS NEXT
Code Example
Python :: python indent selection 
Python :: 3.81/(1000*1000*100) 
Python :: python join tuple integer to string 
Python :: minio python remove an object 
Python :: python diccionario setdefault 
Python :: print nested dictionary values in python 
Python :: when was python 3.7 released 
Python :: jugendwort 2019 
Python :: how to print string in python 
Python :: Django LogEntry or Change History 
Python :: wait_for_message definition 
Python :: This line is compulsory to add anytime you want to use the Pygame library. It must be added before any other pygame function, else an initialization error may occur. 
Python :: list value extraction using python 
Python :: Python Multiline docstring example 
Python :: convert_hex_to_ASCII_3.py 
Python :: how to change speed in ursina 
Python :: substring in python 
Python :: pyton get minimum value of array 
Python :: python n periods of std 
Python :: how to see what variable is closest to a higher element in python 
Python :: Disable console messages in Flask server 
Python :: convertir code python en java 
Python :: pandas ta quick start example 
Python :: what exception occurs when you convert a atring to an integer and fail in python 
Python :: django auto complete light styling 
Python :: how to filter csv file by columns 
Python :: check if cuda is present in torch 
Python :: kivy lang 
Python :: =adaqtar 
Python :: struct is not defined python 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =