We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When entering data, you can only save the edited data by entering, and you cannot save the data and display it in the table by removing the focus.
def on_leave(event, table, row, col, previous_value, new_value, current_input): table.model.df.iat[row, col] = new_value print("Previous cell value:", previous_value) print("New cell value:", new_value) print("Current input:", current_input)
def main_win(): userData = {'Key Type': ['data'], 'Key Data': [''] }
root = tk.Tk() root.minsize(560, 650) root.title("Generate Hex") top_frame = tk.Frame(root) top_frame.pack(fill="both", expand=True) table = Table(top_frame, dataframe=pd.DataFrame(userData), showstatusbar=False) table.show() table.resizeColumn(1, width=380) def leave_event(event, table=table): row, col = table.getSelectedRow(), table.getSelectedColumn() new_value = table.model.df.iat[row, col] current_input = table.model.df.iat[row, col] previous_value = table.model.df.iat[row, col] on_leave(event, table, row, col, previous_value, new_value, current_input) table.bind('<FocusOut>', leave_event) root.mainloop()
if name == "main": main_win()
The text was updated successfully, but these errors were encountered:
changing this would require adding an 'edit' mode as the current behaviour is what people are used to.
Sorry, something went wrong.
No branches or pull requests
When entering data, you can only save the edited data by entering, and you cannot save the data and display it in the table by removing the focus.
def on_leave(event, table, row, col, previous_value, new_value, current_input):
table.model.df.iat[row, col] = new_value
print("Previous cell value:", previous_value)
print("New cell value:", new_value)
print("Current input:", current_input)
def main_win():
userData = {'Key Type': ['data'],
'Key Data': [''] }
if name == "main":
main_win()
The text was updated successfully, but these errors were encountered: