MCPcopy
hub / github.com/PySimpleGUI/PySimpleGUI / _treeview_selected

Method _treeview_selected

PySimpleGUI/PySimpleGUI.py:8988–9007  ·  view source on GitHub ↗

Not user callable. Callback function that is called when something is selected from Table. Stores the selected rows in Element as they are being selected. If events enabled, then returns from Read :param event: event information from tkinter :type event: (unknown)

(self, event)

Source from the content-addressed store, hash-verified

8986 self._visible = visible
8987
8988 def _treeview_selected(self, event):
8989 """
8990 Not user callable. Callback function that is called when something is selected from Table.
8991 Stores the selected rows in Element as they are being selected. If events enabled, then returns from Read
8992
8993 :param event: event information from tkinter
8994 :type event: (unknown)
8995 """
8996 # print('**-- in treeview selected --**')
8997 selections = self.TKTreeview.selection()
8998 self.SelectedRows = [int(x) - 1 for x in selections]
8999 if self.ChangeSubmits:
9000 if self.Key is not None:
9001 self.ParentForm.LastButtonClicked = self.Key
9002 else:
9003 self.ParentForm.LastButtonClicked = ''
9004 self.ParentForm.FormRemainedOpen = True
9005 # if self.ParentForm.CurrentlyRunningMainloop:
9006 # self.ParentForm.TKroot.quit()
9007 _exit_mainloop(self.ParentForm, self)
9008
9009 def _treeview_double_click(self, event):
9010 """

Callers

nothing calls this directly

Calls 1

_exit_mainloopFunction · 0.85

Tested by

no test coverage detected