cgirolet
04-21-2007, 10:49 AM
hello
i managed to add a single file to a listbox using the following code, but even if i set "multiple selection" to true, when i select multiples files only the last one is added
01 MesDoc = Shell.GetFolder(SHF_MYDOCUMENTS);
02 ajout_fichier = Dialog.FileBrowse(true, "Ajouter 1 Fichier ...", MesDoc, "Images (*.jpg,*.png,*.gif,*.png,*.tif)|*.jpg;*.png;*.gif; *.png;*.tif|", "", "", true, true);
03 if (ajout_fichier[1] ~= "CANCEL") then
04 -- enlever le chemin
05 fichier = String.SplitPath(ajout_fichier[1]);
06 -- Ajouter à la liste
07 ListBox.AddItem( "ListBox1", fichier.Filename..fichier.Extension, ajout_fichier[1]);
08 end
output enhanced with AMS Code Pretty (http://www.indigorose.com/forums/showthread.php?t=19409)
can you help me ?
claude
i managed to add a single file to a listbox using the following code, but even if i set "multiple selection" to true, when i select multiples files only the last one is added
01 MesDoc = Shell.GetFolder(SHF_MYDOCUMENTS);
02 ajout_fichier = Dialog.FileBrowse(true, "Ajouter 1 Fichier ...", MesDoc, "Images (*.jpg,*.png,*.gif,*.png,*.tif)|*.jpg;*.png;*.gif; *.png;*.tif|", "", "", true, true);
03 if (ajout_fichier[1] ~= "CANCEL") then
04 -- enlever le chemin
05 fichier = String.SplitPath(ajout_fichier[1]);
06 -- Ajouter à la liste
07 ListBox.AddItem( "ListBox1", fichier.Filename..fichier.Extension, ajout_fichier[1]);
08 end
output enhanced with AMS Code Pretty (http://www.indigorose.com/forums/showthread.php?t=19409)
can you help me ?
claude