Unable to zoom, pan when using windowbuttondownfcn in appdesigner

4 ビュー (過去 30 日間)
Kunal Khosla
Kunal Khosla 2023 年 8 月 31 日
回答済み: Dinesh 2023 年 9 月 6 日
Hi, What happens when I assign a callback to a uifigure windowbuttondownfcn? Does the behaviour change completely? Do I need to set some property in Matlab?

回答 (1 件)

Dinesh
Dinesh 2023 年 9 月 6 日
Hi Kunal.
When you assign a "WindowButtonDownFcn" callback to a "uifigure" in App Designer, you are overriding the default behavior of the mouse button press within the entire window of the app. As a result, built-in interactive features like zooming and panning can be affected, because the callback you've assigned takes precedence over the default behavior.
If your intention is to allow both the custom behavior defined in "WindowButtonDownFcn" and the default zoom/pan behaviors, you will need to implement some logic in your callback to determine when to execute custom actions and when to allow default behaviors.

カテゴリ

Help Center および File ExchangeDevelop uifigure-Based Apps についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by