From 6bc3cef2fb63198bdcb30ea2e178fbb2f7845f7f Mon Sep 17 00:00:00 2001 From: Adam Jurkiewicz Pythonista Local Date: Fri, 19 Dec 2025 11:20:26 +0100 Subject: [PATCH] z --- dzien_05/gui/gui01.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 dzien_05/gui/gui01.py diff --git a/dzien_05/gui/gui01.py b/dzien_05/gui/gui01.py new file mode 100644 index 0000000..b761e53 --- /dev/null +++ b/dzien_05/gui/gui01.py @@ -0,0 +1,25 @@ +import FreeSimpleGUI as sg + +# sg.theme('DarkAmber') # Add a touch of color +# All the stuff inside your window. +layout = [ [sg.Text('Adam Jurkiewicz')], + [sg.Text('Enter something on Row 2'), sg.InputText()], + [sg.Button('Ok'), sg.Button('Przerwij'), sg.Button('HELP')] ] +# ZADANIE: +# dodaj przycik o nazwie SYSTEM, wtedy na ekranie ma być +# print(sys.version) +# pamiętaj o imporcie sys .... + +# Create the Window +window = sg.Window('Nasz super program', layout) +# Event Loop to process "events" and get the "values" of the inputs +while True: + event, values = window.read() + if event == sg.WIN_CLOSED or event == 'Przerwij': # if user closes window or clicks cancel + break + if event == 'HELP': + print("Pomoc dla ludu!!!") + if event == "Ok": + print('You entered ', values[0]) + +window.close() \ No newline at end of file