Jump to content

Anyone know how to tell a ring to resize to the size of its longest string?


Recommended Posts

Posted

Or is that just not possible to do? I'm specifically trying to find a way to do that to a System Ring control.

[EDIT] I post to LAVA... and that way, LabVIEW knows I've sufficiently embarrassed myself publicly with my lack of knowledge, and so now it can show me the answer.

There's a property that I *swear* was not in the pop up menu for the last half-hour called "Named Numeric Size" that I can use to resize the ring control. Not exactly what I wanted, but at least I can build it.

Grrr.

[EDIT] Just in case anyione else is looking for this...

post-5877-0-78654300-1337041750_thumb.pn

  • Like 1
Posted

Looking for *what*? The property you mention is not displayed in the picture.

OTOH, where does the "Get Text Rect.vi" come from - just in case I ever need to know...

Br, Mike

Posted

Mike5: The last property in my property node is the one I was talking about... but Mellroth's "Ring Text.Width" property is even better because you don't have to worry about the stupid "+ 30" that I'm doing to account for the ring.

Mellroth: Does yours work for "zero strings in the array"?

Posted

Mellroth: Does yours work for "zero strings in the array"?

Currently it would probably be 7 pixels wide ;-)

The easiest way of changing this would probably be to add minimum width to the init terminal of the shift register.

/J

Posted

[EDIT] I post to LAVA... and that way, LabVIEW knows I've sufficiently embarrassed myself publicly with my lack of knowledge, and so now it can show me the answer.

For shame! Tsk, tsk.... A less polished version of Mellroth's solution was provided in a post all the way back in 2002 in the LabVIEW forums over at NI (I'm sure you know the place :D ): http://forums.ni.com/t5/LabVIEW/how-can-i-make-a-ring-control-resize-itself-to-display-the-whole/m-p/47562/highlight/true#M30020

All tongue-in-cheek, of course.

Posted

[EDIT] I post to LAVA... and that way, LabVIEW knows I've sufficiently embarrassed myself publicly with my lack of knowledge, and so now it can show me the answer.

We're all just humans, aren't we?

Posted
I recall having some weirdness with "Get Text Rect" not working well with italic and bold fonts. I ended up padding by +(x)% of the width to make things 'pretty'...

Indeed: http://lavag.org/top...ps-italic-text/

The solution proposed by vugie however works: pad the string with a space.

Also I expect the ring control might have a minimum width, and if s trying to set 7px could return an error. Might be wise to enforce a minimum.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.