Sharing data between GUI windows
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I am working on a GUI for an instrument. The instrument is accessed via serial communication.
My question is, what is the easiest way to share data between GUI windows?
Say I have a main GUI window, where I press the 'settings' button which pops out sub-GUI. In settings I define the serial communication attributes and set the serial interface via a 'connect' button. Then I return back to the main GUI window and I would like to use the previously set attributes further to send/receive messages to the instrument. That has to be done using the fprintf command, with the parameters set in the sub-GUI window.
Any suggestions? Thanks in advance
Cheers
Josef
0 comentarios
Respuestas (1)
Jan
el 17 de Jun. de 2013
When the "settings" button is pressed in the main GUI, forward the handle of this GUI to sub-GUI. When the sub-GUI is closed, use guidata() to write the values from the sub-GUI to the handles struct (or any other ApplicationData) of the main-GUI.
Sharing data between GUIs is discussed frequently. Searching in this forum allows you to find more details.
0 comentarios
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!