Sunday, August 10, 2003 [Tweets] [Favorites]

File Choosing Widgets

Michael McCracken has started a discussion about widgets for choosing files (and folders) and displaying the currently chosen item. Apple hasn’t provided any guidance in this matter and uses a variety of designs:

Third-party applications use a variety of designs, too:

Here’s my take:

Text field or pop-up menu?
Use a pop-up menu when space is scarce or when you want to provide preset choices, such as recent folders or a list of known Web browsers. Otherwise use a text field and a button.
Should the text field show just the filename, or its path?
I like to see the full path, starting at ~.
What if the path is too long to fit?
It should be ellipsed in the middle.
Should the text field accept drags?
Of course!
Should the text field be editable?
Some people don’t like this because the user shouldn’t have to deal with paths. On the other hand, it can be a nice time-saver for the user. One thorny issue is what to do about invalid paths. It’s easy to validate the text field after the user’s done typing, and to revert it if the path isn’t valid. However, I don’t like text fields that don’t commit until you press Return and that show invalid data in the interim. Since I haven’t seen how to do this right, I’ll say that the text field should be uneditable.

I’m sure there are many other issues to consider…


No Text Field or PopUp. Combo Box with typeahead and remembering recent choices. You can do this in both Carbon and Cocoa as of 10.2.

Also, regarding validation: just put a tiny warning icon with the text "File[or directory] not found" next to or underneath the combobox. Then don't enable the "OK" button until the user fixes it. Simple and unobtrusive.

About validation: I'm beginning to think that if there's space for it, the file icon could be used as validation - for choosing a file that should already exist. If the path is correct, it shows its icon, if not, perhaps a warning icon or nothing at all.
This also gives a better cue for dragging to/from, since you're dragging an icon onto an icon instead of onto a text field, which seems unnatural.

The editable text field should behave like the tcsh shell in the Terminal, i.e. you start typing the first letters of a file or folder name, press the Tab key and let the system complete the path when it can guess the right choice.

May conflict with existing use of the Tab key in dialogs, though.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment