From d148c3472e66f7e2031f14303b018c2d32306ff8 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Mon, 25 Oct 2021 14:47:43 -0400 Subject: [PATCH] More instructions. Added the now standard "File Location" right click menu --- DemoPrograms/Demo_Image_Resize_and_Base64_Encode.pyw | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/DemoPrograms/Demo_Image_Resize_and_Base64_Encode.pyw b/DemoPrograms/Demo_Image_Resize_and_Base64_Encode.pyw index 4c2a2036..929f4c8e 100644 --- a/DemoPrograms/Demo_Image_Resize_and_Base64_Encode.pyw +++ b/DemoPrograms/Demo_Image_Resize_and_Base64_Encode.pyw @@ -8,7 +8,12 @@ import base64 A quick little utility that will resize an image and also Base64 Encode it. - Base64 is particualr good to use to make icons or other images that you include in your sourcecode. + Base64 is particularly good to use to make icons or other images that you include in your sourcecode. + + Use this Demo to help you code your PySimpleGUI programs. Here's how: + 1. Resize your image + 2. Paste the base64 encoded byte-string into your code as a variable + 3. Use your variable for things like an icon, an image for buttons, etc. Copyright 2021 PySimpleGUI """ @@ -45,7 +50,7 @@ def main(): [sg.Button('Resize', bind_return_key=True), sg.Button('Exit')], [sg.T('Note - on some systems, autoclose cannot be used\nbecause the clipboard is cleared by tkinter')],] - window = sg.Window('Resize Image', layout, icon=image_resize_icon, right_click_menu=sg.MENU_RIGHT_CLICK_EDITME_VER_EXIT, enable_close_attempted_event=True) + window = sg.Window('Resize Image', layout, icon=image_resize_icon, right_click_menu=sg.MENU_RIGHT_CLICK_EDITME_VER_LOC_EXIT, enable_close_attempted_event=True, scaling=1.25) while True: event, values = window.read() @@ -80,6 +85,8 @@ def main(): sg.popup_scrolled(sg.get_versions(), non_blocking=True) elif event == 'Edit Me': sg.execute_editor(__file__) + elif event == 'File Location': + sg.popup_scrolled('This Python file is:', __file__) window.close()