Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
GUI open function

Subject: GUI open function

From: John Zaleski

Date: 11 Aug, 2010 14:53:05

Message: 1 of 4

The OpeningFun() runs before the GUI is visible.

My question is:
Is there a way to have initialization code run, without user input, after the gui is visible?

Thanks,
JZ

Subject: GUI open function

From: Sean

Date: 11 Aug, 2010 15:27:20

Message: 2 of 4

"John Zaleski" <john.zaleski@us.army.mil> wrote in message <i3udgh$ff6$1@fred.mathworks.com>...
> The OpeningFun() runs before the GUI is visible.
>
> My question is:
> Is there a way to have initialization code run, without user input, after the gui is visible?
>
> Thanks,
> JZ

Of course. Just put it in the OutputFcn().

Subject: GUI open function

From: John Zaleski

Date: 11 Aug, 2010 18:02:22

Message: 3 of 4

"Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <i3ufgn$sii$1@fred.mathworks.com>...
> "John Zaleski" <john.zaleski@us.army.mil> wrote in message <i3udgh$ff6$1@fred.mathworks.com>...
> > The OpeningFun() runs before the GUI is visible.
> >
> > My question is:
> > Is there a way to have initialization code run, without user input, after the gui is visible?
> >
> > Thanks,
> > JZ
>
> Of course. Just put it in the OutputFcn().
Sean,
Thanks, that's just what I was looking for.

JZ

Subject: GUI open function

From: ImageAnalyst

Date: 11 Aug, 2010 18:54:36

Message: 4 of 4

Yeah, but I always thought that was counterintuitive. It's true that
it gets run upon startup, but I always thought that it sounded like it
should be run when you're all done with the GUI and it's sending the
output results to the command line, especially when it says this for
its description:
% --- Outputs from this function are returned to the command line.
I guess I wish they'd just give it a different name to describe what
it actually does or when it's run.

Tags for this Thread

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.

Contact us