Skip to content
New issue

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

Double-click detection for tables. #654

Closed
MikeTheWatchGuy opened this issue Nov 4, 2018 · 3 comments
Closed

Double-click detection for tables. #654

MikeTheWatchGuy opened this issue Nov 4, 2018 · 3 comments
Labels
documentation Docs need updating Done - Install Dev Build (see docs for how) See https://docs.pysimplegui.com/en/latest/documentation/installing_licensing/upgrading/ enhancement New feature or request

Comments

@MikeTheWatchGuy
Copy link
Collaborator

You can now double-click on a table row and it will return an event in response by setting the parameter bind_return_key to True.

This Listbox element already works this way.

That makes 2 ways of getting events from tables:
change_submits returns as soon as a row is clicked on
bind_return_key returns when a row is double clicked or the return key is press while on a row.

@MikeTheWatchGuy MikeTheWatchGuy added enhancement New feature or request Done - Install Dev Build (see docs for how) See https://docs.pysimplegui.com/en/latest/documentation/installing_licensing/upgrading/ labels Nov 4, 2018
@john144
Copy link

john144 commented Nov 4, 2018 via email

@PySimpleGUI PySimpleGUI added the documentation Docs need updating label Aug 25, 2019
@fralau
Copy link

fralau commented Jul 27, 2022

If you need both, how to you know the difference between simple click and double-click?

@PySimpleGUI
Copy link
Owner

If you need to differentiate, then you can bind the double-click event.

window["-TABLE-"].bind('<Double-Button-1>' , "+-double click-")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Docs need updating Done - Install Dev Build (see docs for how) See https://docs.pysimplegui.com/en/latest/documentation/installing_licensing/upgrading/ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants