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

1 view (last 30 days)
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.

Accepted Answer

Fangjun Jiang
Fangjun Jiang on 2 Dec 2020
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.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products


Release

R2012a

Community Treasure Hunt

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

Start Hunting!