From 8dfaa61d367cac1d3a49a227655d970efc630050 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Thu, 3 Jan 2019 08:27:17 -0500 Subject: [PATCH] Added a few type hints --- PySimpleGUI.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 01542bfd..628d0fc3 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -4641,7 +4641,7 @@ else: # ------------------------------------------------------------------------------------------------------------------ # # ------------------------------------------------------------------------------------------------------------------ # -def PackFormIntoFrame(form, containing_frame, toplevel_form): +def PackFormIntoFrame(form, containing_frame, toplevel_form:Window): def CharWidthInPixels(): return tkinter.font.Font().measure('A') # single character width @@ -5318,7 +5318,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): else: element.tktext_label = tk.Label(tk_row_frame, width=width, height=height, bd=border_depth) if element.BackgroundColor is not None: - element.tktext_label.config(background=element.BackgroundColor); + element.tktext_label.config(background=element.BackgroundColor) element.tktext_label.image = photo # tktext_label.configure(anchor=tk.NW, image=photo) @@ -5791,7 +5791,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): return -def ConvertFlexToTK(MyFlexForm): +def ConvertFlexToTK(MyFlexForm:Window): master = MyFlexForm.TKroot master.title(MyFlexForm.Title) InitializeResults(MyFlexForm) @@ -5830,9 +5830,8 @@ def ConvertFlexToTK(MyFlexForm): # ----====----====----====----====----==== STARTUP TK ====----====----====----====----====----# -def StartupTK(my_flex_form): +def StartupTK(my_flex_form:Window): # global _my_windows - # ow = _my_windows.NumOpenWindows ow = Window.NumOpenWindows # print('Starting TK open Windows = {}'.format(ow))