From: loli J on
Hi ,,


In matlab gui,
I want that if the user press a button, the program displays for example "wait until the process is finished" and then when it is finished the user will be able to press the button again, because I don't want the user to press double click on a button( there will be a problem).

How can I do it ?

Thanks
From: Wayne King on
"loli J" <matlab_cs(a)hotmail.com> wrote in message <huj5j0$6if$1(a)fred.mathworks.com>...
> Hi ,,
>
>
> In matlab gui,
> I want that if the user press a button, the program displays for example "wait until the process is finished" and then when it is finished the user will be able to press the button again, because I don't want the user to press double click on a button( there will be a problem).
>
> How can I do it ?
>
> Thanks

Hi, will

waitbar and waitfor work for you?

Wayne
From: Walter Roberson on
loli J wrote:

> In matlab gui, I want that if the user press a button, the program
> displays for example "wait until the process is finished" and then when
> it is finished the user will be able to press the button again, because
> I don't want the user to press double click on a button( there will be a
> problem).
>
> How can I do it ?

The usual procedure is something like this,

set(Button_handle, 'enable', 'off')
old_pointer = get(gcf, 'Pointer');
set(gcf, 'Pointer', 'watch')

Then when the work is finished,

set(gcf, 'Pointer', old_pointer)
set(Button_handle, 'enable', 'on')
From: loli J on
Thanks for you all , it finally works =)
From: loli J on
Walter Roberson <roberson(a)hushmail.com> wrote in message <F29Pn.96334$304.20899(a)newsfe12.iad>...
> loli J wrote:
>
> > In matlab gui, I want that if the user press a button, the program
> > displays for example "wait until the process is finished" and then when
> > it is finished the user will be able to press the button again, because
> > I don't want the user to press double click on a button( there will be a
> > problem).
> >
> > How can I do it ?
>
> The usual procedure is something like this,
>
> set(Button_handle, 'enable', 'off')
> old_pointer = get(gcf, 'Pointer');
> set(gcf, 'Pointer', 'watch')
>
> Then when the work is finished,
>
> set(gcf, 'Pointer', old_pointer)
> set(Button_handle, 'enable', 'on')


I tried this solution and it works
but I think that I need to disable the pressed button and all other buttons in the gui
until the process of the clicked button is finished
Can I do it ? =(
 |  Next  |  Last
Pages: 1 2
Prev: Fast find
Next: Keyboard input error!