From e89f47912511663f2978ab73c5cad613e1969aa6 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Thu, 9 Jul 2020 05:31:15 -0400 Subject: [PATCH] shortcut for cprint rather than using sg.cprint. --- DemoPrograms/Demo_Multiline_cprint_Printing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DemoPrograms/Demo_Multiline_cprint_Printing.py b/DemoPrograms/Demo_Multiline_cprint_Printing.py index aac861de..db2b3248 100644 --- a/DemoPrograms/Demo_Multiline_cprint_Printing.py +++ b/DemoPrograms/Demo_Multiline_cprint_Printing.py @@ -20,13 +20,15 @@ import PySimpleGUI as sg def main(): + + cprint = sg.cprint + MLINE_KEY = '-ML-'+sg.WRITE_ONLY_KEY # multiline element's key. Indicate it's an output only element MLINE_KEY2 = '-ML2-'+sg.WRITE_ONLY_KEY # multiline element's key. Indicate it's an output only element MLINE_KEY3 = '-ML3-'+sg.WRITE_ONLY_KEY # multiline element's key. Indicate it's an output only element output_key = MLINE_KEY - layout = [ [sg.Text('Multiline Color Print Demo', font='Any 18')], [sg.Multiline('Multiline\n', size=(80,20), key=MLINE_KEY)], [sg.Multiline('Multiline2\n', size=(80,20), key=MLINE_KEY2)],