LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
blawson

Truncate Long Paths

Status: Completed
Available in LabVIEW 2012

I don't like the way that long file paths are shown in path controls and indicators:  If the path is longer than the textbox (and it usually is!), the user only sees the first several levels that fit.  This can be pretty confusing.

 

One way to solve this issue is to truncate the path in the middle in such a way that the filename or last folder (which is usually what's most important) is always shown.  I've seen this in other UIs and it should be a natural thing for users to understand.

 

Here's an illustration:

truncate_path_ctrl.png 

 

I think this should be a built in feature of the path controls and indicators, accessible through right-click menus and/or the properties menu of the control at edit time.

-Barrett
CLD
16 Comments
G-Money
NI Employee (retired)
Status changed to: In Beta
 
ThiCop
Trusted Enthusiast

This status should be changed to Completed.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
G-Money
NI Employee (retired)
Status changed to: Completed
Available in LabVIEW 2012
elset191
Active Participant

Does anyone know if the code to truncate the path is public and buried somewhere in vi.lib?  I'm making a QControl with a combobox of paths, but the combobox does not truncate like the path control.

 

I'm currently working around it using a dummy path control, that I set to the size of my combobox text area, then use Path Text.Text property to get the abbreviated string and apply that to my text box.

--
Tim Elsey
Certified LabVIEW Architect
AristosQueue (NI)
NI Employee (retired)

elset191 : Your workaround is the only mechanism for it. It's a baked in part of that control.

elset191
Active Participant

Got it.  Thanks for the quick response, AQ!

--
Tim Elsey
Certified LabVIEW Architect