LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wrapping Captions and String Position

 

ClusterCaption.png

Omar
0 Kudos
Message 11 of 15
(590 Views)

ClusterCaption.png

This works better keeping the caption centered above the cluster

Omar
0 Kudos
Message 12 of 15
(579 Views)

You need to subtract 5 to 10 pixels from the Caption.Top value to bring the caption above the cluster frame. Without that the bottom of the caption sits right on top to the inter panel of the cluster. You need to move the caption up the thickness of the cluster frame. 

 

I must be missing something??

If 7 8 and 9 are correct, what was wrong with 1 and 4

 

ClusterCaption.png

Omar
0 Kudos
Message 13 of 15
(566 Views)

@Omar_II wrote:

You need to subtract 5 to 10 pixels from the Caption.Top value to bring the caption above the cluster frame. Without that the bottom of the caption sits right on top to the inter panel of the cluster. You need to move the caption up the thickness of the cluster frame. 

 


It turns out you only have to subtract 1.  I think that's because you want the caption to sit on top of the cluster instead of having the cluster top and caption bottom be the same.  There's also some kind of positioning problem that manifests when you change the caption height.  If you run this once the caption comes overlaps the cluster b 4 or 5 pixels but if you run it again without changing the text it's just the 1 pixel overlap.  I'm not sure what's causing this.

 

This has been a great learning experience about how captions, etc. are positioned.  Great comments all around.

 

Kelly Bersch
Certified LabVIEW Developer
Kudos are always welcome
0 Kudos
Message 14 of 15
(559 Views)

Right we have a working solution and the praise has to go to Lynn.

 

Lynn's method works perfectly and I have slightly expanded it which is shown in the attached VI.

 

Instead of having to set a known number of line feed values, simply set an iteration value for a For loop that is greater than or equal to the number of lines in the caption/string indicator. This value could be 5, 10, 100 etc, it doesn't matter as the -1 forces the last line to be shown and does not expand the actual caption box/string indicator. This is true for both the caption box and string indicator.

 

It must also be pointed out that from my observations, as long as size to text is off for the caption box, its default state is to wrap the text, however the caption box does still have the issue of not applying the defaults values it was saved with when re-initialising unlike the string indicator. 

 

Based on the fact the string indicator will initialise to default without any additional code I think I will continue to use the string indicator as I am already using them as RavensFan described in that they are transparent to look like labels/captions. I had used transparent string indicators from the start, it just appeared that the captions were somehow more closely binded to the cluster itself. Clearly not.

 

Many thanks for everybody's help and input, really appreciated.

 

Mitch 

 

 

0 Kudos
Message 15 of 15
(536 Views)