Comments are closed.
2 CommentsOldest to Newest
handleGUI = myGUIfunction(params);and then you can call the handles-structure with the command
handles = guidata(handleGUI);I used to define exclusively the properties of my GUI, so I can find it later. For example, I set the 'Tag' or the 'Name' of the GUI with a special pattern like 'This is the GUI that I want to find', so I can do later:
handleGUI = findobj(0, 'Tag','This is the GUI that I want to find')and again:
handles = guidata(handleGUI);And my preferred solution is (when I defined exclusively my GUI-figure) to create a "Shortcut" which finds the GUI-handle and load the current handles-scructure in to the workspace. In this case you should remember that this method will get the actual state of the GUI, so if you change any value in the GUI, you must get the handles structure again.