Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileListBox Patterns

Status
Not open for further replies.

NetNomad312

Technical User
Jun 16, 2004
27
US
I am creating a program that will call Notepad to read certain types of files. I hope to eventually have a combobox to select from several different filters, or "all filters" to show all relevant files in the FileListBox. The problem is, I cannot seem to add multiple file types to the box's Pattern property. I looked it up in the MDSN library already, and it said I had only to separate them with a semicolon, like:

"*.exe; *.bat"

This is the exact way I did it... and at runtime, the box only displays the first file type in that list. Just to be sure, I also tried adding this line to Form_Load:

FileList.Pattern = "*.fs; *.lmp"

No effect. Is there a typo in the library entry? What is the correct way to do this?
 
Forgot to add, are you refreshing the control/path as you select different extensions. I think I'm right otherwise egg on my face, you need to use the refresh syntax each time you change the pattern for what your looking for. Walking away slowly.
 
Welcome to Tek-Tips NetNomad312

To get the best from the forum you need to read faq222-2244, as I notice you haven't yet found any of your answers helpful.

For this question just remove the space after the semicolon:

FileList.Pattern = "*.fs;_*.lmp"

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
I'll wake up soon, nice spooting John
 
Heh, I've gotten that link before. But anyway... thanks for the suggestions. I didn't even know there needed to be a refresh, but I guess it makes sense.

*lmp (with an L) just stands for "lump," a form of data that can basically serve any purpose to the group I'm making this program for... but they're usually in text format.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top