commit
						7d8c5d0b0d
					
				
					 2 changed files with 4 additions and 6 deletions
				
			
		|  | @ -34,10 +34,7 @@ def main(): | |||
|               [sg.Button('Exit', size=(7, 1), pad=((600, 0), 3), font='Helvetica 14')]] | ||||
| 
 | ||||
|     # create the window and show it without the plot | ||||
|     window = sg.Window('Demo Application - OpenCV Integration', | ||||
|                        layout, | ||||
|                        no_titlebar=False, | ||||
|                        location=(0, 0)) | ||||
|     window = sg.Window('Demo Application - OpenCV Integration', layout, no_titlebar=False, location=(0, 0)) | ||||
| 
 | ||||
|     # locate the elements we'll be updating. Does the search only 1 time | ||||
|     image_elem = window['-image-'] | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| #!/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' | ||||
| 
 | ||||
|  | @ -641,7 +641,7 @@ class Element(): | |||
|         self.Visible = visible | ||||
|         self.TKRightClickMenu = None | ||||
|         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.metadata = metadata  # type: Any | ||||
|         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  ------------------------- # | ||||
|             elif element_type == ELEM_TYPE_MENUBAR: | ||||
|                 element = element  # type: MenuBar | ||||
|                 print(f'Menu tearoff = {element.Tearoff}') | ||||
|                 menu_def = element.MenuDefinition | ||||
|                 element.TKMenu = element.Widget = tk.Menu(toplevel_form.TKroot, | ||||
|                                                           tearoff=element.Tearoff)  # create the menubar | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue