Programatically add OpeningFcn in GUI
Mostrar comentarios más antiguos
Hi,
I have programatically created a GUI app using a single function file (e.g. mygui.m) and putting all my code in that single file. Now I need to add an OpeningFcn in that code. Where and how should I add that OpeningFcn in my code so that I can add data in handles variable in that OpeningFcn to access it later in my other functions?
Thanks
4 comentarios
Kevin Chng
el 23 de Oct. de 2018
What does it mean?
programatically created a GUI app
Are you use GUIDE, app designer or programmically GUI?
if programically GUI, it is quite flexible, you may insert a function after you declare all the relevant components. The function can be your OpeningFcn.
Haider Ali
el 23 de Oct. de 2018
Editada: Haider Ali
el 23 de Oct. de 2018
Kevin Chng
el 24 de Oct. de 2018
Editada: Kevin Chng
el 24 de Oct. de 2018
Using handles to pass data is what we favour to do in GUIDE Gui.
I guess it should be also workable in programmically GUI. There is some knowledge require to structure the object and handle in your GUI like what we will see in GUIDE Gui (Guide generate it automatically).
Hence, I will recommend you use global to pass your data.
Walter Roberson
el 24 de Oct. de 2018
Don't use global!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!