MCPcopy Create free account
hub / github.com/Akascape/CTkTable / get_selected_row

Method get_selected_row

CTkTable/ctktable.py:572–580  ·  view source on GitHub ↗

Return the index and data of the selected row

(self)

Source from the content-addressed store, hash-verified

570 return self.values
571
572 def get_selected_row(self):
573 """ Return the index and data of the selected row """
574 selected_row_index = None
575 for i in range(self.rows):
576 if self.frame[i, 0].cget("fg_color") == self.hover_color:
577 selected_row_index = i
578 break
579 selected_row_data = self.get_row(selected_row_index) if selected_row_index is not None else None
580 return {"row_index": selected_row_index, "values": selected_row_data}
581
582 def get_selected_column(self):
583 """ Return the index and data of the selected row """

Callers

nothing calls this directly

Calls 2

get_rowMethod · 0.95
cgetMethod · 0.80

Tested by

no test coverage detected