Load a Folder into Listbox
Hello All,
I've made a code where when I make my listbox, I need to individually add the names of my waves to put it into the listWave. But, I want to be able to use a folder, and have Igor know to use the waves within that folder as my listWave. Here's what I have now:
listBox lb1, pos={34,13}, size={188,118}, mode=4
make /T /N=0 textwave={"_a","_b","_c","_d"}
make /N=(numpnts(textwave)) checkwave=32
listbox lb1, listWave=textwave, selWave=checkwave
With the "_a" through "_d" the names of my data waves that I manually put in, instead of having Igor pull the waves from the data browser.
What I would like to have is for Igor take the names of my data waves, recognize those names, and put them within the text wave.
I tried doing this:
listBox lb1, pos={34,13}, size={188,118}, mode=4
make /T /N=0 textwave=wavelist("_*",";","")
make /N=(numpnts(textwave)) checkwave=32
listbox lb1, listWave=textwave, selWave=checkwave
thinking that the wavelist would recognize any way that starts like that and input it into my textwave in individual rows. Instead, I find that it leaves the textwave blank.
Does anyone have any suggestions for this? Thanks!
take a look at
displayHelpTopic "ListToTextWave"
to turn a wavelist into a free text wave, then duplicate to create your listwave.
In the code above you create a text wave with zero rows.
textwave=wavelist("_*",";","") puts the output of wavelist into every point of textwave, as would happen with textwave="any;string;you;like".
August 7, 2020 at 01:27 pm - Permalink