how to create checkboxes in appdesigner based on number of specific files present in the folder?
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Vinayak Untwale
 el 9 de Dic. de 2021
  
    
    
    
    
    Comentada: Rik
      
      
 el 9 de Dic. de 2021
            I have couple of text files placed in current folder.The number of textfiles could be variable. I want appdesigner to create number of checkboxes corresponding to those text files having name same as those text files. How can I do that?
0 comentarios
Respuesta aceptada
  Rik
      
      
 el 9 de Dic. de 2021
        You can create uicheckbox objects in a loop in your code, depending on a list of files.
2 comentarios
  Rik
      
      
 el 9 de Dic. de 2021
				You can find more tips and advice here. The point is that you can create graphics objects with code.
n=1;
h(n)=uicheckbox('position',[10 10+100*n 50 100],...
    'Text',sprintf('box %d',n),...
    'parent',app.figure);
n=2;
h(2)=uicheckbox('position',[10 10+100*n 50 100],...
    'Text',sprintf('box %d',n),...
    'parent',app.figure);
You can probably see the pattern here. Unfortunately I can't run the code in the online environment, as uifigure is not supported.
Más respuestas (0)
Ver también
Categorías
				Más información sobre Environment and Settings en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

