LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I Need an Array of Rotated String Indicators


@Earl_of_Lemongrab wrote:

Hello Phrog,

 

It seems like the solution proposed by Paul is sufficient for your application. But I would like to suggest an alternative solution  (with its own trade offs) that may address some of your functionality concerns. The width of a string indicator and text wrapping can both be set in the properties menu. Because of these settings, each character would appear vertically stacked. An array of these string indicators could be sized dynamically and viewed using a scroll bar. Unfortunately the letter “m” is wider than combinations of other two letters such as “is”. If the width is set too low then the letter “m” gets cutoff. If the width is set too high then smaller letters like “is” appear on the same line. There is no magic width that prevents these two cases.

 

The example I have attached works around the letter “m” by appending a space between each non-m character and uses an indicator width of 23 pixels. This is enough space to display the letter “m” while the inserted spaces prevent smaller letters from appearing on the same line. Despite this inconvenience, you gain the use of built in dynamic array sizing and the horizontal  scroll bar.

 

Otherwise, scroll bar functionality is not built into clusters. It is possible to implement a scroll bar for a cluster programmatically as shown in this community example: https://decibel.ni.com/content/docs/DOC-35704

 

This solution isn't necessarily easy to implement, so using stacked characters in an array may be a worthwhile trade off depending on your application.


If you used a non-propotional font like Courier New, you shouldn't have that spacing issue.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 11 of 14
(404 Views)

Hi Paul,

 

Yes, I was thinking of a fixed-width typeface. But that's only part of the problem.

 

I guess I should have said at the start that this is intended to be column headers. As such, a very narrow text field will yield all the text top-aligned (ragged bottoms) with space between the columns and the end of the text. To make this work I could pack spaces in front of the text to force shorter strings to the bottom (yielding ragged tops). While that is workable, it will not yield the most readable of text. But it appears like that's the best I'm going to get.

 

But it sure would be nice if there was the ability to rotate a string (or numeric) indicator.

 

Regards,

 

Phrog

0 Kudos
Message 12 of 14
(400 Views)

There is a deprecated property for enabling scrollbars on clusters, but it is quirky.  The scrollbars disappear when the VI is saved, and also when it stops running.

See attachment.

 

If you want to get really funky, you could build the cluster (in a non-runnint VI) at runtime, then load that VI into a sub-panel.

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 13 of 14
(392 Views)

This time with the attachment attached.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 14 of 14
(374 Views)