No BSD License  

Highlights from
fitpath

4.5

4.5 | 3 ratings Rate this file 5 Downloads (last 30 days) File Size: 1.81 KB File ID: #13915
image thumbnail

fitpath

by Erik Newton

 

10 Feb 2007 (Updated 11 Mar 2009)

Gracefully truncate a file path to fit into uicontrols.

| Watch this File

File Information
Description

This is a simple utility to gracefully fit a file path into a uicontrol by replacing some of the directory names with '...'.

It was primarily developed as a tutorial on how to use the extent property of uicontrols. The full tutorial can be found at our website.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
13 Feb 2007 John D'Errico

I did not dislike this utility itself. In fact, I thought it was a good idea. What I dislike is the complete lack of help. When you use help on this file, all it returns is a copyright notice, and the author's name and a website URL. There is NO indication of how the code is used, what arguments it takes, anything else.

HELP IS SUPPOSED TO HELP THE USER. The help facility is not provided to cover your behind with a copyright notice, nor as an advertisement for your website.

If the author repairs this, I will upgrade my rating.

20 Feb 2007 Erik Newton

I have fixed the command line help issue.

21 Feb 2007 John D'Errico

I should have returned to this more quickly. The author has repaired the help problem.

HOWEVER, SELF APPLIED RATINGS ARE STONGLY DISCOURAGED.

Perhaps the author assumes that once the help was improved, this code deserves an excellent rating. I'll disagree. I still had to look through the demo carefully to use it. For example, nowhere does the help state what classes of uicontrols this can be applied to.

I'll also note that if you already have a ToolTip string on your uicontrol, this code overwrites it (a BAD idea.) A better tool would have allowed you to decide how to deal with the tooltip. I've not checked, but perhaps a second line of tooltip may be possible by supplying a cell array of strings.

I did like the overall idea though, so I'll give it a 4 rating.

Please login to add a comment or rating.
Updates
14 Feb 2007

Now with added command line help.

11 Mar 2009

Just updated tag list

Tag Activity for this File
Tag Applied By Date/Time
gui tools Erik Newton 22 Oct 2008 09:00:12
example Erik Newton 22 Oct 2008 09:00:12
uicontrol extent property Erik Newton 22 Oct 2008 09:00:12
gui Erik Newton 11 Mar 2009 14:59:00
extent Erik Newton 11 Mar 2009 14:59:01
extent property Erik Newton 11 Mar 2009 14:59:01
path Erik Newton 11 Mar 2009 14:59:01
paths Erik Newton 11 Mar 2009 14:59:01
truncate Erik Newton 11 Mar 2009 14:59:01
fit Erik Newton 11 Mar 2009 14:59:01

Contact us at files@mathworks.com