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 Opening Function2

Subject: GUI Opening Function2

From: Maxx Chatsko

Date: 17 Jun, 2011 15:52:04

Message: 1 of 4

Hello,
    This is a repost from last week. I have a GUI that I will eventually compile and run on node computers as part of a parallel computer system. I have my code set up to run after opening the function, but the GUI doesn't appear. Is there a one-liner that will make my GUI appear before I run my calculations?
    My functions all have "end", so I have a feeling it doesn't show the GUI until it reaches the "end" line in OpeningFcn.

function SlaveWorker_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

Do my calculations....

end

Does anyone know why my GUI doesn't appear on the screen? Feel free to ask questions. Thanks for any help.

     Maxx
 

Subject: GUI Opening Function2

From: Sadik

Date: 17 Jun, 2011 21:14:05

Message: 2 of 4

Hi Maxx,

I didn't experiment with my suggestions below but you may want to give them a try:

Suggestion 1: drawnow;
Suggestion 2: pause(0.5); % wait for 0.5 before executing your code

Both of these should be placed before your "Do my calculations" line.

Best.

Subject: GUI Opening Function2

From: Sadik

Date: 17 Jun, 2011 21:39:04

Message: 3 of 4

I meant (wait for 0.5 seconds) of course. :)

Subject: GUI Opening Function2

From: Maxx Chatsko

Date: 20 Jun, 2011 12:42:02

Message: 4 of 4

Sadik,
   Thanks for the suggestions, but I have tried those and they do not work (I guess that was in the previous week's post, my bad). Thanks for the help anyway!

Maxx

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