From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-22-2010 10:22 AM
I am using LabVIEW 2009, and I am both auto filling, and manual entering of text. I would like the row height to expand or contract to match the string length in a way similar to how Excel uses wrap around. The cell length is fixed, so the row height needs to self adjust. If I enter the text, and it is longer than the cell, I can manually go in and hit shift + Enter to get it to widen the row, and carry the rest of the text to the second line. Is this possible to do automatically, and if so, how is it done?
Thank you!
10-22-2010 01:03 PM - edited 10-22-2010 01:04 PM
I don't think this is possible with settings or properties of the table.
I have done something similar where I used Courier font (which is a fixed-width font - this is very importnant) and when the Active Cell's string length = X, then make the cell twice as tall (Height sub-property of Active Cell). Where X = the string length where the wrap needs to occur.
Does anyone else know of a way?
10-22-2010 02:26 PM
Hi again. I looked at my old code, and it makes the cell longer, not taller, sorry. I don't think it's going to word wrap.
10-22-2010 02:53 PM
@broken Arrow wrote:
I don't think this is possible with settings or properties of the table.
I have done something similar where I used Courier font (which is a fixed-width font - this is very importnant) and when the Active Cell's string length = X, then make the cell twice as tall (Height sub-property of Active Cell). Where X = the string length where the wrap needs to occur.
Does anyone else know of a way?
Aside from "update while typing" and checking for each update to decide if a CR needs inserted, no.
Re: Fixed width font
On the Pictuer pallette there is a "get Text Rectangle" function that will return the size of the rectangle required for the string you pass it using the font you specify. It can be used to "test" how large a string would be if displayed.
Take care,
Ben
10-23-2010 09:48 AM
Ben wrote:
On the Pictuer pallette there is a "get Text Rectangle" function that will return the size of the rectangle required for the string you pass it using the font you specify. It can be used to "test" how large a string would be if displayed.
Take care,
Ben
Ben, sounds like a Micro-Nugget! Up to it?
10-26-2010 08:14 AM
Thank you for your replies. I left at noon on Friday, and was out of the office yesterday. I go over what was suggested, and see if something works. I didn't think it was possible, but you never know till you ask! 🙂
Thank you!
04-08-2020 07:30 PM
Hi
I liked Ben's approach. Attached VI and snippet.
Nick
09-29-2021 07:58 AM - edited 09-29-2021 08:14 AM
I wanted something a little different. Here's what I came up with,