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

Posted on 2007-10-21
Last Modified: 2013-11-25
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
Question by:mrb121212
    LVL 8

    Expert Comment

    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.

    Author Comment

    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.

    Author Comment

    i guess, i should re-state the following:
    the program needs to filter the files in the fileslistbox for *both* JPG and XLS extensions.
    LVL 1

    Accepted Solution

    the fix is to remove the space in the pattern string like so:
    that should fix it.

    Expert Comment

    oytun12 your answer is usefull for me too.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Visual Fox Pro commands 15 17
    How to get/set directory for Word dialog box using VSTO 4 27
    Mixed results 10 64
    Best book to learn C++ 3 31
    This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
    This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
    This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now