LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you set Table or Tree controls to overlap cell text?

Solved!
Go to solution

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.

 

overlap.png

0 Kudos
Message 1 of 13
(3,622 Views)

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.

 

overlapExcel.png

0 Kudos
Message 2 of 13
(3,611 Views)
Solution
Accepted by BertMcMahan

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.

Greets, Dave
Message 3 of 13
(3,529 Views)

@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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 13
(3,498 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 5 of 13
(3,481 Views)

@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 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 13
(3,471 Views)

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.

Greets, Dave
Message 7 of 13
(3,467 Views)

@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 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 8 of 13
(3,456 Views)

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 🙂

Message 9 of 13
(3,446 Views)

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 Smiley Wink

 

Draw Table Image.png

Greets, Dave
Message 10 of 13
(3,424 Views)