LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto resizing path control

How can I resize (programatically) so that the whole path is visible in a path control (for a file selected at run time)?
Thanks!
0 Kudos
Message 1 of 10
(4,338 Views)

you can use a string indicaor/control instead to display the path, and create an invoke node called "size to text"

Hope this helps.

0 Kudos
Message 2 of 10
(4,328 Views)
this is probably a very roundabout way of doing it, but they make it difficult on purpose, so you don't accidentally overlap your controls.


Message Edited by JeffOverton on 03-20-2008 10:53 AM
Message 3 of 10
(4,327 Views)
Hi rashid,

it seems you can't as the "bounds" property of a path control is read only (as for other controls too...).

The path indicator usually is fixed in size, also in other programs not written in LV...
The common work-around are:
- cut to filename
- use abbreviation (parts of the folder structure is presented as "/../../")
- use a scrollbar
- make the path control big enough Smiley Very Happy
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 10
(4,324 Views)
Hi Jeff,

how do you set the "Width" property to writable? Is this part of LV scripting? All my LV installations (ok, atleast LV7.1 and LV8.5) don't allow this feature...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 10
(4,318 Views)
Dear Jeff! One question. The last width which one is it? size.width or something else?
Thanks a lot for the great answer.


Message Edited by rashid19672008 on 03-20-2008 08:18 PM
0 Kudos
Message 6 of 10
(4,308 Views)

You have to right click on the control and set the caption to visible (which I thought I eliminated by the first caption.visible step), otherwise labview doesn't create the caption for it, I guess.  And yes, the last one is Path Control.size.width.

 

This works in 8.2.1.  Also, it extends to the right.

 

edit - tst brought it to my attention that property nodes execute top to bottom, so you can combine the first three nodes.



Message Edited by JeffOverton on 03-20-2008 12:29 PM
Message 7 of 10
(4,281 Views)
Hi Jeff,

aahh it's the size and not the bounds...

Just a note: for me this method seems to get to small values for the width, I need some adjustments (~24 pixels?) probably due to path control border included in size property...

Happy Easter to you all!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 10
(4,267 Views)
I noticed something like that, but I wasn't sure if it was a font issue or a border issue, and I'm kind of swamped today so I couldn't monkey around and find out.
0 Kudos
Message 9 of 10
(4,257 Views)
If you want to go the other way around, here's an XControl that truncates the path:


Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 10 of 10
(4,246 Views)