Radio button value does not update state
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Cristian
el 17 de Jul. de 2020
Comentada: Cristian
el 17 de Jul. de 2020
Hi, i am having some problems working with matlab gui using the pushbutton and radio button controls. I am using a while cicle inside a pushbutton callback, and i realized that the sentence "handles.radiobutton1.Value" (radiobutton1 is ok) does not update the radio button value until the while cicle is finish. I mean, i change the radio button state from GUI and its value is just update when the while cicle is finish.
In the pushbutton property inspector the INTERRUPTIBLE option is ON.
Thanks in advanced
0 comentarios
Respuesta aceptada
Image Analyst
el 17 de Jul. de 2020
Call drawnow as soon as you set the state of the radio button:
while whatever
% other code
% Now change the radio button value:
handles.radiobutton1.Value = newValue;
drawnow; % Force display to refresh immediately.
% other code;
end
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!