Trigger event callback from another event callback

I want to trigger 'CheckedNodesChangedFcn' callback of uitree from 'ButtonPushedFcn' callback of a pusbutton in appdesigner. Can anyone please suggest how to achieve this?

 採用された回答

Kevin Holly
Kevin Holly 2022 年 8 月 5 日

0 投票

You can simply write
CheckedNodesChangedFcn(app)
within the 'ButtonPushedFcn' callback

5 件のコメント

Arkaniva Sarkar
Arkaniva Sarkar 2022 年 8 月 7 日
This is not working as the event of 'CheckedNodesChangedFcn' is changing to the event of 'ButtonPushedFcn', when CheckedNodesChangedFcn(app) is being used within 'ButtonPushedFcn' callback.
Kevin Holly
Kevin Holly 2022 年 8 月 8 日
Can you provide more details of what you are trying to accomplish?
Arkaniva Sarkar
Arkaniva Sarkar 2022 年 8 月 11 日
The 'CheckedNodesChangedFcn' is being used to plot (patch plot) checked items in an axes. The 'ButtonPushedFcn' modifies the plotdata, and unchecks some treenodes based on some conditions. I'm trying to update the plots after the plotdata/checked treenodes are modified after clicking the pushbutton.
Kevin Holly
Kevin Holly 2022 年 8 月 11 日
Arkaniva,
Please see the app attached and let me know if it addresses your question.
Arkaniva Sarkar
Arkaniva Sarkar 2022 年 8 月 11 日
It's exactly what I wanted to achieve.
Thank you.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeApp Building についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by