Doesn't ButtonDownFcn work for left-click?

7 次查看(过去 30 天)
hi everyone, i would to know if it's possible to have the same behavior for the ButtonDownFcn for the left-click instead of right-click. i have to set invisible an editText when i click on another editText. Now it works only with right click. i've simply used this line code:
set(handles.editGIRI_r,'Visible','Off');

采纳的回答

Steven Lord
Steven Lord 2015-9-21
Look at the documentation for a uicontrol's ButtonDownFcn, Callback, and Enable properties. The ButtonDownFcn for a uicontrol will execute on left-click if the uicontrol is not enabled (off or inactive.) If the uicontrol is enabled, its Callback executes instead.
  1 个评论
Daniele Morello
Daniele Morello 2015-9-22
编辑:Daniele Morello 2015-9-22
thank's a lot :) it works. but now, i have to click two times to insert a value? the first time to enable the edit text and the second time to allow to type a value. can i resolve in one step?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Entering Commands 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by