Bonjour,
Un clic sur un bouton me remplie une liste box.
Ca marche, mais des fois non avec des warning!
Je ne comprends pas pourquoi c'est aléatoire, je ne c'est pas où chercher le problème.![]()
les messages de Matlab:
Mon code de l'action du bouton:Warning: single-selection listbox control requires that Value be an integer within String range
Control will not be rendered until all of its parameter values are valid.
Warning: single-selection listbox control requires that Value be an integer within String range
Control will not be rendered until all of its parameter values are valid.
Warning: single-selection listbox control requires that Value be an integer within String range
Control will not be rendered until all of its parameter values are valid.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 function pushbuttonPath_Callback(hObject, eventdata, handles) % hObject handle to pushbuttonPath (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) namePath=uigetdir(matlabroot,'Select a new directory'); path(path,namePath); set(handles.editPath, 'String', namePath); fileList = dir([namePath '\*.csv']); listBoxCSV=''; for i=1:length(fileList) listBoxCSV=strvcat(listBoxCSV,fileList(i).name); end set(handles.listboxCSV, 'String',cellstr(listBoxCSV));
Partager