Thread Subject: gui menus

Subject: gui menus

From: Teodor

Date: 9 Oct, 2009 08:55:04

Message: 1 of 6

Hello,
I am trying to do 3 gui menus that are linked between each other. In every menu I have a "Next" button, and when I push it, then the next menu should appear and the one that was open before should close.
Can you help me with some tips about how can I make to close the previous menu when the next one opens.
Thanks in advance,
Alex

Subject: gui menus

From: Jan Simon

Date: 9 Oct, 2009 09:15:20

Message: 2 of 6

Dear Teodor!

> I am trying to do 3 gui menus that are linked between each other. In every menu I have a "Next" button, and when I push it, then the next menu should appear and the one that was open before should close.
> Can you help me with some tips about how can I make to close the previous menu when the next one opens.

At first please define, what you mean by the term "menu".
Is it a dialog window, a menubar, a popup-menu, a listbox uicontrol, a uibuttongroup?

Just show us, what you have done so far and most likely somebody recommends to use the DELETE command.

Kind regards, Jan

Subject: gui menus

From: Teodor

Date: 9 Oct, 2009 10:08:01

Message: 3 of 6

"Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de> wrote in message <hamuv8$c3p$1@fred.mathworks.com>...
> Dear Teodor!
>
> > I am trying to do 3 gui menus that are linked between each other. In every menu I have a "Next" button, and when I push it, then the next menu should appear and the one that was open before should close.
> > Can you help me with some tips about how can I make to close the previous menu when the next one opens.
>
> At first please define, what you mean by the term "menu".
> Is it a dialog window, a menubar, a popup-menu, a listbox uicontrol, a uibuttongroup?
>
> Just show us, what you have done so far and most likely somebody recommends to use the DELETE command.
>
> Kind regards, Jan

Sorry, I am a begginer in Matlab GUI. There are 3 windows that contain popups and buttons (Next button). I want whenever I push the Next button on one window, the next window should appear and the previous one should close. With the opening of the next window it is not a problem, I have put in the callback function the command open('next_window.fig'). But I have a problem with the close command,I think I make some mistakes somewhere and I don't know how to make it work...
Can you help me with some tips? I hope that I have been clear enough...
Thanks again,
Regards,
Alex

Subject: gui menus

From: ImageAnalyst

Date: 9 Oct, 2009 10:15:07

Message: 4 of 6

Alex:
How about if you just have one GUI with 3 panels on them and the Back
& Next buttons below the panel? You put all the controls into the 3
panels and when you click Back or Next, you simply set the visibility
on or off for the appropriate panels. I think this would be simpler
than having 3 separate guis or one gui and having to set the
visibility of dozens of controls (that weren't within panels).

Subject: gui menus

From: Jan Simon

Date: 9 Oct, 2009 10:18:03

Message: 5 of 6

Dear Alex!

> > Dear Teodor!
Sorry - naming confusion.

> Sorry, I am a begginer in Matlab GUI. There are 3 windows that contain popups and buttons (Next button). I want whenever I push the Next button on one window, the next window should appear and the previous one should close. With the opening of the next window it is not a problem, I have put in the callback function the command open('next_window.fig'). But I have a problem with the close command,I think I make some mistakes somewhere and I don't know how to make it work...

You can close a window with the command CLOSE and DELETE with the figure handle as argument.
Does this help?

Kind regards, Jan

Subject: gui menus

From: Ana Laura Rodriguez

Date: 27 Oct, 2009 22:12:19

Message: 6 of 6

"Teodor " <teodoralexandra@yahoo.com> wrote in message <hamtp8$gr5$1@fred.mathworks.com>...
> Hello,
> I am trying to do 3 gui menus that are linked between each other. In every menu I have a "Next" button, and when I push it, then the next menu should appear and the one that was open before should close.
> Can you help me with some tips about how can I make to close the previous menu when the next one opens.
> Thanks in advance,
> Alex

if i understood the question, maybe this will help...

you have 3 GUIs, when you start one you have a next button, and you want to press that button so a new GUI appears and the other one closes, Right?

look for the command lines of that button on the mfile editor and type at the end:
close('guiname1'); %this will close your first GUI

Can you tell me how did you do to open a new GUI with a button??? please...

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
gui menu Ana Laura Rodriguez 27 Oct, 2009 18:14:07
rssFeed for this Thread

Contact us at files@mathworks.com