From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i make a ring control resize itself to display the whole text?

I have a vi which loads strings from a text file into a ring control. i would like to make it resize itself so that it doesn't clip off any of the text in each item. Is there any way of doing this?
0 Kudos
Message 1 of 3
(3,106 Views)
You could get the size of the string using "Get Text Rect.vi" and use the size of your longest string to set the width of your ring. I made a quick example to give you an idea of what I mean.

Brian
Message 2 of 3
(3,106 Views)

Brian's VI gave me a good starting point, but here's a far more complete utility that takes into account the font of the ring, any styling done to add extra parts, etc. It also is a VIM so you can retain the strict typing of the value field when you use the output.

Saved in LV2017.

0 Kudos
Message 3 of 3
(1,497 Views)