フィルターのクリア

How to stop getting cursor position?

1 回表示 (過去 30 日間)
KAE
KAE 2017 年 6 月 21 日
コメント済み: KAE 2017 年 6 月 23 日
I have a function based on GUI_27 by Matt Fig. The function continuously displays the position of the cursor as the mouse is moved within the axis. I'd like to know: how can I turn off this behavior, so it stops extracting and displaying the cursor location? In my real GUI, the user pushes a pushbutton to start displaying the cursor location, but I don't know how to stop it.

採用された回答

Geoff Hayes
Geoff Hayes 2017 年 6 月 23 日
KAE - how have you implemented the function as described in GUI_27? Do you use the same callback like
set(S.fh,'windowbuttonmotionfcn',{@fh_wbmfcn,S}) % Set the motion detector
If so, you could try clearing this callback as
set(S.fh,'windowbuttonmotionfcn',[]);
so that the WindowButtonMotionFcn no longer has a callback function to update the cursor position. When you need to know the cursor position then just restore the callback as however you have initialed it before.
  1 件のコメント
KAE
KAE 2017 年 6 月 23 日
This will work with how I have the code implemented, thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by