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:
uiwait multiple figure interface

Subject: uiwait multiple figure interface

From: samuele

Date: 18 Jun, 2010 12:35:06

Message: 1 of 3

hello,
i have a problem concerning the uiwait. I look at the forum and others webpages without finding any relevant information.

My problem is the following :
I have manually created a tabbed GUI with uitabpanel. In the interface there are several parameters that the user can configure. When parameters are selected, the user press the "run" button and before running the code i check the inserted parameters.
If parameters are wrong, i popup a message error with errordlg and i use uiwait to block the program till the user as pressed the ok button on the error dialog. But at this time a problem arises, if i move the error dialog box without pressing ok (on the error dialog) and i try to modify the parameters and press the run buttton in my interface this process can be executed.....I seem that the uiwait does not block my interface....
My question is the following : how can i block the GUI till the errordlg is not closed? (by block i mean that user cannot interract with my GUI)

Thank you, bests
Samuele

Subject: uiwait multiple figure interface

From: Walter Roberson

Date: 18 Jun, 2010 13:01:38

Message: 2 of 3

Samuele wrote:

> My problem is the following :
> I have manually created a tabbed GUI with uitabpanel. In the interface
> there are several parameters that the user can configure. When
> parameters are selected, the user press the "run" button and before
> running the code i check the inserted parameters. If parameters are
> wrong, i popup a message error with errordlg and i use uiwait to block
> the program till the user as pressed the ok button on the error dialog.
> But at this time a problem arises, if i move the error dialog box
> without pressing ok (on the error dialog) and i try to modify the
> parameters and press the run buttton in my interface this process can be
> executed.....I seem that the uiwait does not block my interface....
> My question is the following : how can i block the GUI till the errordlg
> is not closed? (by block i mean that user cannot interract with my GUI)

Use the 'modal' option of errordlg().

Usually in GUIs you would want to set the 'Enable' property of the Run
button to 'off' while you are doing a calculation, unless you
specifically designed the system to create multiple independent windows
for the various runs and you don't mind that the runs will interfere
with each other (that is, that only one of them can actually do
calculations at any one time, with the others being shut out of
continuing until the routine does the calculation allows interrupts by
doing a pause() or drawnow() or the like.)

Subject: uiwait multiple figure interface

From: samuele

Date: 18 Jun, 2010 13:13:05

Message: 3 of 3

Walter Roberson <roberson@hushmail.com> wrote in message <S6KSn.83265$HG1.71884@newsfe21.iad>...
> Samuele wrote:
>
> > My problem is the following :
> > I have manually created a tabbed GUI with uitabpanel. In the interface
> > there are several parameters that the user can configure. When
> > parameters are selected, the user press the "run" button and before
> > running the code i check the inserted parameters. If parameters are
> > wrong, i popup a message error with errordlg and i use uiwait to block
> > the program till the user as pressed the ok button on the error dialog.
> > But at this time a problem arises, if i move the error dialog box
> > without pressing ok (on the error dialog) and i try to modify the
> > parameters and press the run buttton in my interface this process can be
> > executed.....I seem that the uiwait does not block my interface....
> > My question is the following : how can i block the GUI till the errordlg
> > is not closed? (by block i mean that user cannot interract with my GUI)
>
> Use the 'modal' option of errordlg().
>
> Usually in GUIs you would want to set the 'Enable' property of the Run
> button to 'off' while you are doing a calculation, unless you
> specifically designed the system to create multiple independent windows
> for the various runs and you don't mind that the runs will interfere
> with each other (that is, that only one of them can actually do
> calculations at any one time, with the others being shut out of
> continuing until the routine does the calculation allows interrupts by
> doing a pause() or drawnow() or the like.)

Thank you sooo much =) It exactly what i'm looking for.. ;)

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