commit
7d8c5d0b0d
|
@ -34,10 +34,7 @@ def main():
|
||||||
[sg.Button('Exit', size=(7, 1), pad=((600, 0), 3), font='Helvetica 14')]]
|
[sg.Button('Exit', size=(7, 1), pad=((600, 0), 3), font='Helvetica 14')]]
|
||||||
|
|
||||||
# create the window and show it without the plot
|
# create the window and show it without the plot
|
||||||
window = sg.Window('Demo Application - OpenCV Integration',
|
window = sg.Window('Demo Application - OpenCV Integration', layout, no_titlebar=False, location=(0, 0))
|
||||||
layout,
|
|
||||||
no_titlebar=False,
|
|
||||||
location=(0, 0))
|
|
||||||
|
|
||||||
# locate the elements we'll be updating. Does the search only 1 time
|
# locate the elements we'll be updating. Does the search only 1 time
|
||||||
image_elem = window['-image-']
|
image_elem = window['-image-']
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
version = __version__ = "4.19.0.2 Unreleased - Window.set_title added, removed resetting stdout when flush happens"
|
version = __version__ = "4.19.0.3 Unreleased - Window.set_title added, removed resetting stdout when flush happens, fixed MenuBar tearoff not working"
|
||||||
|
|
||||||
port = 'PySimpleGUI'
|
port = 'PySimpleGUI'
|
||||||
|
|
||||||
|
@ -641,7 +641,7 @@ class Element():
|
||||||
self.Visible = visible
|
self.Visible = visible
|
||||||
self.TKRightClickMenu = None
|
self.TKRightClickMenu = None
|
||||||
self.Widget = None # Set when creating window. Has the main tkinter widget for element
|
self.Widget = None # Set when creating window. Has the main tkinter widget for element
|
||||||
self.Tearoff = False
|
# self.Tearoff = False # why was this here?? should already be in the Menubar element...confusing...
|
||||||
self.ParentRowFrame = None # type tk.Frame
|
self.ParentRowFrame = None # type tk.Frame
|
||||||
self.metadata = metadata # type: Any
|
self.metadata = metadata # type: Any
|
||||||
self.user_bind_dict = {} # Used when user defines a tkinter binding using bind method - convert bind string to key modifier
|
self.user_bind_dict = {} # Used when user defines a tkinter binding using bind method - convert bind string to key modifier
|
||||||
|
@ -10684,6 +10684,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
|
||||||
# ------------------------- MENU placement element ------------------------- #
|
# ------------------------- MENU placement element ------------------------- #
|
||||||
elif element_type == ELEM_TYPE_MENUBAR:
|
elif element_type == ELEM_TYPE_MENUBAR:
|
||||||
element = element # type: MenuBar
|
element = element # type: MenuBar
|
||||||
|
print(f'Menu tearoff = {element.Tearoff}')
|
||||||
menu_def = element.MenuDefinition
|
menu_def = element.MenuDefinition
|
||||||
element.TKMenu = element.Widget = tk.Menu(toplevel_form.TKroot,
|
element.TKMenu = element.Widget = tk.Menu(toplevel_form.TKroot,
|
||||||
tearoff=element.Tearoff) # create the menubar
|
tearoff=element.Tearoff) # create the menubar
|
||||||
|
|
Loading…
Reference in New Issue