diff --git a/DemoPrograms/Demo_Invisible_Elements.py b/DemoPrograms/Demo_Invisible_Elements.py index b605781d..c41acf8e 100644 --- a/DemoPrograms/Demo_Invisible_Elements.py +++ b/DemoPrograms/Demo_Invisible_Elements.py @@ -9,7 +9,7 @@ import PySimpleGUI as sg """ -layout = [[sg.Col([[sg.Text('My Window')], [sg.Input(key='-IN-'), sg.Button('My button', key='-OUT-')]], key='-COL-')], +layout = [[sg.Col([[sg.Text('My Window')], [sg.Input(key='-IN-'), sg.Button('My button', key='-OUT-')]], key='-COL-'), sg.Canvas(size=(0,0), pad=(0,0))], [sg.Button('Invisible'), sg.Button('Visible'), sg.Button('Exit')]] window = sg.Window('Window Title', layout) diff --git a/DemoPrograms/Demo_Invisible_Elements_Pinning.py b/DemoPrograms/Demo_Invisible_Elements_Pinning.py index 3946b402..d5bbbb18 100644 --- a/DemoPrograms/Demo_Invisible_Elements_Pinning.py +++ b/DemoPrograms/Demo_Invisible_Elements_Pinning.py @@ -24,7 +24,7 @@ def pin(elem): :param elem: the element to put into the layout :return: A column element containing the provided element ''' - return sg.Column([[elem]], pad=(0,0)) + return sg.Column([[elem, sg.Canvas(size=(0,0), pad=(0,0))]], pad=(0,0)) layout = [ [sg.Text('Window with Hidden Button')],