Thread Subject: Programmatic GUI

Subject: Programmatic GUI

From: Derek Eggiman

Date: 30 Sep, 2009 18:25:20

Message: 1 of 2

So when one creates a GUI using GUIDE the handle structure is already created and allows the user to add in any variables he should wish and they will be passed from function to function without issue.

What is the best way to accomplish this in a programmaticaly created GUI (aka without guide). I am aware that global variables would be an option but this seems like a messy way to do things. There is also the option of nested functions that would seem to accomplish the task as well.

I guess I'm asking what is the best or most commonly accepted practice to accomplish the task of data sharing among functions in a programmaticaly created GUI? Could I implement a handle structure, like that used in guide, that would take user created variables, and how might that be accomplished? Are there any good tutorials out there on programmaticaly created GUIs? Thanks for the reply.

Subject: Programmatic GUI

From: Nathan

Date: 30 Sep, 2009 18:30:15

Message: 2 of 2

On Sep 30, 11:25 am, "Derek Eggiman" <eggima...@gmail.com> wrote:
> So when one creates a GUI using GUIDE the handle structure is already created and allows the user to add in any variables he should wish and they will be passed from function to function without issue.
>
> What is the best way to accomplish this in a programmaticaly created GUI (aka without guide). I am aware that global variables would be an option but this seems like a messy way to do things. There is also the option of nested functions that would seem to accomplish the task as well.
>
> I guess I'm asking what is the best or most commonly accepted practice to accomplish the task of data sharing among functions in a programmaticaly created GUI? Could I implement a handle structure, like that used in guide, that would take user created variables, and how might that be accomplished? Are there any good tutorials out there on programmaticaly created GUIs? Thanks for the reply.

For GUI tutorial, check Matt Fig's submission on the FEX:
http://www.mathworks.com/matlabcentral/fileexchange/24861

There are 35 examples of GUI's created programmatically, doing
different things.

I hope that helps you.

Plus, I think you should be able to just add the handles structure
yourself in you GUI. Just add a input and output for each function
that uses something in your defined handles.

-Nathan

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com