Is it possible to call a callback from one GUI to another separate GUI?

1 回表示 (過去 30 日間)
Greg Whitfield
Greg Whitfield 2020 年 12 月 2 日
コメント済み: Greg Whitfield 2020 年 12 月 2 日
I have two stand-alone Matlab GUI’s built with the Matlab function guide, GUI1 and GUI2. From a callback in GUI1, I can open and run GUI2. I can also access the properties of the controls in GUI2 from GUI1. Is it possible to use a function or callback from GUI1 to call a callback or function in GUI2? I prefer not to combine the two GUI’s into a single GUI. This is for a project using R2012a.

採用された回答

Fangjun Jiang
Fangjun Jiang 2020 年 12 月 2 日
To call a callback is to call a function. So if you save that function in a separate file and package it with GUI1 and GUI2, then yes, Both GUI would be able to call that function.
If that function is inside the code for GUI1 or GUI2, and assume both GUI have a single M-file for its code. Then, no, a local function can not be called from another file.

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2012a

Community Treasure Hunt

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

Start Hunting!

Translated by