Tuesday, 27 August 2013

Python Traits equivalent of MATLAB ButtonDownFcn

Python Traits equivalent of MATLAB ButtonDownFcn

Is there some sort of equivalent callback or Handler function in Python to
MATLAB uicontrol's "ButtonDownFcn"? From Matlab's documentation.
"A callback routine that can execute when you press a mouse button while
the pointer is on or near a uicontrol."
Specifically, this would be used for calling up a touchscreen keypad to
enter values into QLineEdit fields. Short of writing a separate function
that returns the location of a mouse click and compares to the locations
of existing buttons (and that likely wouldn't be cross-platform
compatible), nothing came to my mind. Thoughts?

No comments:

Post a Comment