Results 1 to 5 of 5

Thread: OpenFileDialog for choosing txt OR directory (but nothing else)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2004
    Posts
    27

    OpenFileDialog for choosing txt OR directory (but nothing else)

    hi,

    is it possible to set the filter of an OpenFileDialog to allow only *.txt files OR directories to be choosen BUT nothing else ?
    and of course: if yes, how?

    thanx,

    Usul

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373
    I would like someone to say otherwise, but I dont think that this is possible without maybe a custom control being made.

    The open file dialog is looking for just a file to be selected... so if you select a folder, it will just open the folder, not return it as the selected value. Then there is the folder dialog which has you browse for just a folder.

  3. #3
    Lively Member TLord's Avatar
    Join Date
    Jun 2004
    Posts
    95
    For inputting a directory path from the user you use the FolderBrowserDialog control, not OpenFileDialog.
    Do you think my life is easy?
    Do you think it's good to win?
    do you think it's nice to kill?
    Do you think learning is a must?
    Do you think computers are nothing?
    Do you think this post is stupid?
    Do ypu think we're really humen?

    DO YOU THINK IT'S GOOD TO THINK AT ALL? ? ? ! ! !

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jul 2004
    Posts
    27
    well thats not very flexible. so one would have to write his own dialog, right? how annoying.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2004
    Posts
    27
    i didnt find FolderBrowserDialog . ???

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width