UI Interest Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I Vertically Center Text in a Control?

   Couldn't find an answer in a forum search. Anybody know how to vertically center text in a System Ring?

Untitled.png

Message 1 of 8
(13,052 Views)

I would like to know it too!

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
0 Kudos
Message 2 of 8
(7,251 Views)

Unfortunately, I'm fairly certain that LabVIEW does not provide a way to center the text in a ring control vertically.


Christina Rogers
Principal Product Owner, LabVIEW R&D
0 Kudos
Message 3 of 8
(7,251 Views)

There is currently no way to vertically center the text in a system ring.  You can fake it by adding extra carriage returns in the ring text:

pic1.png

Note that when you do this, the extra carriage returns appear as spaces in the ring text when the pop-up ring is visible:

pic2.png

Other than this, the only other way to accomplish what you want would be to create a picture control that behaves like the ring. Painful.

0 Kudos
Message 4 of 8
(7,251 Views)

I haven't tried this, but can you do this in a .NET or ActiveX ring (or combo box, which I believe is the name used for the equivalent control)? This will make the code Windows only.


___________________
Try to take over the world!
0 Kudos
Message 5 of 8
(7,251 Views)

Have you tried resizing and repositioning the "Ring Text" part usng the Control Editor?

Screen Shot 2012-09-02 at 3.33.35 PM.png

Message 6 of 8
(7,251 Views)

Jack - That solution works as long as you know the text will always be one line, but multi-line text will be cut-off.


Christina Rogers
Principal Product Owner, LabVIEW R&D
0 Kudos
Message 7 of 8
(7,251 Views)

I think centering vertically should be added to LabVIEW. When you agree then please vote for http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Add-vertical-center-for-string-indicators-and-don-t-di...

0 Kudos
Message 8 of 8
(7,251 Views)