Is it possible to change the color of the " waitbar" in the GUI? i mean the red colored thing moving inside the wait bar ? if yes how?
    5 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Pradeep Gowda
 el 8 de Feb. de 2015
  
    
    
    
    
    Comentada: Walter Roberson
      
      
 el 30 de Sept. de 2016
            please help.
0 comentarios
Respuesta aceptada
  Geoff Hayes
      
      
 el 8 de Feb. de 2015
        Pradeep - from http://www.mathworks.com/matlabcentral/answers/101667-how-do-i-change-the-color-of-the-bar-in-a-waitbar-in-matlab-7-5-r2007b (which works on my R2014a), you can try the following:
 % create the wait bar
 h = waitbar(0,'Please wait...');
 % find the patch object
 hPatch = findobj(h,'Type','Patch');
 % change the edge and face to blue
 set(hPatch,'FaceColor',[0 0 1], 'EdgeColor',[0 0 1]);
 % run the wait bar
 steps = 1000;
 for step = 1:steps
    % computations take place here
    waitbar(step / steps)
 end
 close(h)
When you execute the above, the bar will now be blue rather than the default red. Try it and see what happens!
3 comentarios
  Walter Roberson
      
      
 el 30 de Sept. de 2016
				The above is valid only on HG1, which is up to R2014a. Starting from R2014b waitbar are done differently. See http://www.mathworks.com/matlabcentral/answers/293374-waitbar-color-2016a-is-broken-red-how-to-set-to-older-continuous-green#answer_227433
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



