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.
08-21-2019 03:33 PM
I need either a Table or Tree control where some strings are fairly long (used as subsection headers, one per row) and some are fairly short (used as Name/Value pairs, two items per row). Right now I have to have my columns set to be the max width of the "parent" item, even if that's the only thing in that row, otherwise you can't read the entire Parent item. I can't find a setting or property that lets me do this. Is it possible? Example with Tables shown below, but you get the same behavior with a Tree.
Solved! Go to Solution.
08-21-2019 03:38 PM
As another example, this is the default behavior in Excel, and I'm trying to reproduce it or something similar using Tree and/or Tables.
08-22-2019 04:07 AM
As far as I know, the LabVIEW controls (table, multicolumn listbox) do not support this feature.
Since the HTML- tables support merged cells, you could use a browser object via ActiveX to display a self- created html- table.
08-22-2019 08:11 AM
@daveTW wrote:
...use a browser object via ActiveX to display a self- created html- table.
How can I NOT Kudo what I had in mind?
Ben
08-22-2019 09:20 AM
A Labview solution would probably include checking the column width and splitting the text in fitting chunks. It shouldn't be too hard but will inevitably cause some "jitter" at column shifts.
/Y
08-22-2019 09:28 AM
@Yamaeda wrote:
A Labview solution would probably include checking the column width and splitting the text in fitting chunks. It shouldn't be too hard but will inevitably cause some "jitter" at column shifts.
/Y
An even uglier LV solution could use a/some "hidden" string indicator(s) positioned in the right place.
Cringe
Ben
08-22-2019 09:36 AM - edited 08-22-2019 09:37 AM
A Labview solution would probably include checking the column width and splitting the text in fitting chunks. It shouldn't be too hard but will inevitably cause some "jitter" at column shifts.
/Y
That is another idea.
But if you go this path, perhaps it's better (has a nicer and more natural look) to invoke the "Get Image" function and draw your own text at appropriate positions with the 2D drawing functions. If you want to edit the table or move the column separators the effort increases dramatically, but if you don't need this, the work should be of the same amount. And since the 2D picture indicator has hor/vert scrollbars, this should behave much better than the splitted strings.
08-22-2019 10:05 AM
@daveTW wrote:
A Labview solution would probably include checking the column width and splitting the text in fitting chunks. It shouldn't be too hard but will inevitably cause some "jitter" at column shifts.
/Y
That is another idea.
But if you go this path, perhaps it's better (has a nicer and more natural look) to invoke the "Get Image" function and draw your own text at appropriate positions with the 2D drawing functions. If you want to edit the table or move the column separators the effort increases dramatically, but if you don't need this, the work should be of the same amount. And since the 2D picture indicator has hor/vert scrollbars, this should behave much better than the splitted strings.
That is not as crazy as it may sound.
Use the Invoke node "Get image" push it into a picture cotrol
Add the extra long text
Mouse down hides the picture control and moves the hidden off-screen table to viable
User interacts with the table
Enter, mouse leave or something grabs the table image ...
lather rinse repeat.
Ben
08-22-2019 10:39 AM
Thanks for the tips everyone. I'm marking "you can't do it" as solution since the question was technically "how can you make the control do this thing", but your other answers have been great suggestions as well.
For the short term, "use shorter headers" is probably what I'll wind up doing, as this particular project doesn't warrant doing either HTML tables or the 2D image switcharoo. I like both ideas but they're both more work on "GUI sauce" than I can really justify right now.
Thanks for the tips 🙂
08-22-2019 02:13 PM
So, as I wrote it down in my former post, it came into my mind, that I myself could need this for an old project to beautify the data presentation. So I tried this and want to post my solution (it is not very general but perhaps a good start for other requirements). It was great fun to program this