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

1 visualización (últimos 30 días)
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.

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 2 de Dic. de 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.

Más respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Productos


Versión

R2012a

Community Treasure Hunt

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

Start Hunting!

Translated by