How to detect a left double-click on a cell of a uitable?

6 visualizaciones (últimos 30 días)
Yao Li
Yao Li el 31 de Mzo. de 2014
Respondida: BhaTTa el 5 de Sept. de 2024
If I add a command
get(handles.figure1,'selectiontype')
under function figure1_WindowButtonDownFcn, only right single/double click on a cell of a uitable can be detected. I'm wondering how to detect a left double-click on a cell.

Respuestas (1)

BhaTTa
BhaTTa el 5 de Sept. de 2024
@Yao Li, Steps to Detect a Left Double-Click on a uitable Cell:
  1. Use the CellSelectionCallback: This callback can be used to detect when a cell is selected. However, it does not directly detect double-clicks.
  2. Use the WindowButtonDownFcn and WindowButtonUpFcn: These can be used to detect mouse button presses and releases. You can track the time between these events to determine a double-click.
  3. Track Clicks and Timing: Implement logic to track whether a double-click has occurred based on the timing of clicks.
hope it helps!

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by