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:
GUIDE questions

Subject: GUIDE questions

From: wapo

Date: 24 Sep, 2008 11:46:37

Message: 1 of 5

Hi all,

I have a couple of questions regarding the use of GUIDE to develope
GUIs. Here they go:

1. I have a drop-down menu in a GUI. Selecting something from the menu
will call a script with very heavy computations. While MATLAB is
running the background script the drop-down menu is semi-visible (some
parts of the menu are fussed with the original GUI which is not
aesthetically pleasant). How can I force MATLAB to clear out the GUI
from the junk of the drop menu before initiating the selected script.

I used drawnow but it didn't do anything.

2. How can I align objects using the main GUI figure as a guide. For
example, I have a push button and I want to be 10 pixels from the
borders of the GUI. Or I have a static text box that I want it to be
centered using as guide the left and right vertical borders of the
GUI.

3. (This is probably a BUG) Lets assume that we I have multiple
objects (for example axes) and I want to change their size all at
once. Select all of them and use the property inspector to change, for
example, their width. Some of them will get the new value for width
but not all of them. And not always. Keeping all of them selected and
giving the same width value again for a second time might update some
more objects but again not all. And so on.

Any suggestions?

Thank you in advance

Subject: GUIDE questions

From: wapo

Date: 24 Sep, 2008 12:18:16

Message: 2 of 5

I forgot one more thing. Is it possible to change the background color
of the GUI to something more interesting. For example an image.

Subject: GUIDE questions

From: Dave Brackett

Date: 24 Sep, 2008 15:41:02

Message: 3 of 5

wapo <apostolos.georgakis@gmail.com> wrote in message <f95eb6db-8fae-4087-8b1e-09b25da80a70@k37g2000hsf.googlegroups.com>...
> I forgot one more thing. Is it possible to change the background color
> of the GUI to something more interesting. For example an image.

don't know about your initial message questions, but you can change the colour of the GUI background from the property inspector. Make sure nothing is selected before clicking this and it will open the inspector for the GUI itself. Then adjust the colour from the 'color' property. Don't know how you could apply an image though.

Subject: GUIDE questions

From: Dave Brackett

Date: 24 Sep, 2008 15:48:02

Message: 4 of 5

"Dave Brackett" <davebrackett@hotmail.com> wrote in message <gbdn2e$kd1$1@fred.mathworks.com>...
> wapo <apostolos.georgakis@gmail.com> wrote in message <f95eb6db-8fae-4087-8b1e-09b25da80a70@k37g2000hsf.googlegroups.com>...
> > I forgot one more thing. Is it possible to change the background color
> > of the GUI to something more interesting. For example an image.
>

Actually, this look exactly like what you are after for setting an image as a background:

http://blogs.mathworks.com/pick/2007/10/16/matlab-basics-setting-a-background-image-for-a-gui/

Subject: GUIDE questions

From: wapo

Date: 1 Oct, 2008 07:00:49

Message: 5 of 5

Ok,

for anybody having the same problem I found the answer to the first
question. Although my solution is idiotic it works cause it gives
MATLAB time to think. Use pause(x) to let the GUI window be re-
rendered.

Apo

Tags for this Thread

No tags are associated with 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