Set Edit Text Empty

8 visualizaciones (últimos 30 días)
Moh
Moh el 7 de Dic. de 2014
Comentada: Jan el 7 de Dic. de 2014
I am programming GUI. In this GUI I have two edit text and a button. when I print to the button shows the result at the end of the invoice to the two edit text. the invoice period 2 to 3 minute. I want every time I print on Button set both Edit Text Empty and after the end of the statement shows the result in Edit Text I have the code written but set both Edit Text Empty does not work
function rechnen_button_Callback(hObject, eventdata, handles)
set(handles.D_edit,'String','');
set(handles.P_end_edit,'String','');
here is the rest code
set(handles.D_edit,'String',D*1e3);
set(handles.P_end_edit,'String',p_(1));

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 7 de Dic. de 2014
Editada: Azzi Abdelmalek el 7 de Dic. de 2014
set(handles.D_edit,'String',num2str(D*1e3));
set(handles.P_end_edit,'String',num2str(p_(1)));
  3 comentarios
Azzi Abdelmalek
Azzi Abdelmalek el 7 de Dic. de 2014
Maybe you need to use the pause command to see the result
set(handles.D_edit,'String','');
set(handles.P_end_edit,'String','');
pause(3)
Jan
Jan el 7 de Dic. de 2014
pause(3)? Why do you assume that waiting 3 seconds is useful?

Iniciar sesión para comentar.

Más respuestas (1)

Moh
Moh el 7 de Dic. de 2014
Editada: Moh el 7 de Dic. de 2014
that worked fine I have another solution with "drawnow"
set(handles.D_edit,'String','');
set(handles.P_end_edit,'String','');
drawnow;
thanks

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by