From: only on 30 Mar 2010 15:54 i added a push button to gui and made it open aspecific folder .how can i display the content of this folder in listbox. i need the function to do it.
From: ImageAnalyst on 30 Mar 2010 16:00 On Mar 30, 3:54 pm, "only " <only_love_...(a)yahoo.com> wrote: > i added a push button to gui and made it open aspecific folder .how can i display the content of this folder in listbox. > i need the function to do it. ------------------------------------ Use listOfFilenames=dir(yourFilePatternString) to get the list of filenames. Then use set(handles.lsitbox1, 'string', listOfFilenames) to load up the listbox.
From: Walter Roberson on 30 Mar 2010 16:08 only wrote: > i added a push button to gui and made it open aspecific folder .how can > i display the content of this folder in listbox. > i need the function to do it. function h = ListContents(TheFolderName, LowerLeft) %The author is not responsible for the faulty specifications for %the functionality. if ~exist('TheFolderName', 'var') TheFolderName = '.'; end if ~exist('LowerLeft', 'var') LowerLeft = [0 0]; end fileinfo = dir(TheFolderName); if isempty(fileinfo) h = 'Non-existent folder'; return end filenames = {fileinfo.name}; h = uicontrol('Style','list', 'Units', 'pixels', ... 'Position', [LowerLeft 0 0], String', filenames); ext = get(h, 'Extent'); set(h, 'Position', [LowerLeft ext(3)+17 ext(4)]); end
From: Kirill on 30 Mar 2010 16:09 uigetdir Kirill
From: only on 30 Mar 2010 16:56 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <58ca9271-1290-4117-ae22-f8547ca18b41(a)31g2000vbq.googlegroups.com>... > On Mar 30, 3:54 pm, "only " <only_love_...(a)yahoo.com> wrote: > > i added a push button to gui and made it open aspecific folder .how can i display the content of this folder in listbox. > > i need the function to do it. > > ------------------------------------ > Use listOfFilenames=dir(yourFilePatternString) to get the list of > filenames. > Then use set(handles.lsitbox1, 'string', listOfFilenames) to load up > the listbox. what do u mean by FilePatternString?
|
Next
|
Last
Pages: 1 2 Prev: Where to find the file cdna.tif for fractal compression? Next: classregtree node split order |