Link to home
Start Free TrialLog in
Avatar of mrb121212
mrb121212

asked on

FileListBox.Pattern = "*.xls, *.jpg" not working correctly

I have a program that is to filter the files in the list for both *.xls and *.jpg.
when i add in
FileListBox.Pattern="*.XLS; *.JPG"
i get only XLS
and vicacersa if i switch the ordering of the extensions.
please let me know fi there is an issue with this
Avatar of Wikkard
Wikkard
Flag of Australia image

You need to include both text to be displayed in the dropdown and the underlying file filter mask.
eg Log Files (*.log)|*.log|All Files (*.*)|*.*

Use the pipe | character to serate them as shown above.
Avatar of mrb121212
mrb121212

ASKER

Hi Wikkard,
The use of pipe in the FileListBox.Pattern results in no items being shown.
that sounds like a SaveFileDialog or OpenFileDialog that you are talking about.
 please revise.
thanks
i guess, i should re-state the following:
the program needs to filter the files in the fileslistbox for *both* JPG and XLS extensions.
ASKER CERTIFIED SOLUTION
Avatar of oytun12
oytun12

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
oytun12 your answer is usefull for me too.