Clear a FileListBox

Hello Experts,
How do you clear the contents of a filelistbox with a click of a button?

cheers.
sayeed_seherAsked:
Who is Participating?
 
sbennettsConnect With a Mentor Commented:
But the filelistbox has a path and will display the files in that path, until the path or pattern changes, the files in that path will always be displayed.

The best option would be the pattern option to change it to something crazy, then when you want to change the directorylistbox, it sets the path and pattern accordingly...
0
 
sbennettsCommented:
The filelist box is listing the files in the path specified in the path property, you either need to change your path, change your pattern to something that doesn't exist (e.g. *.qza) or make the filelist box invisible.
Simon.
0
 
sayeed_seherAuthor Commented:
can I get a code example?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
sbennettsCommented:
To do which?

myForm.myFileListBox.visible = false

will do it or

myForm.myFileListBox.pattern = "*.qza" 'or another file extension...

Simon.
0
 
sayeed_seherAuthor Commented:
I apologize for the confusion, I should have been clearer in the begining. I have a directorylistbox which when I select a folder, shows the contents in the filelistbox. The user can then select a file from the filelistbox. I would like to put a button that will keep the filelistbox visible, yet clear the contents and at the same time not set the pattern or path because that will not allow it to work with the directorylistbox. Hope that helps.
0
 
sayeed_seherAuthor Commented:
Thanks for your help!
0
All Courses

From novice to tech pro — start learning today.