LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to have multiple lines of text in a column header of a table and multiple lines of text in the table cell itself?

I have two questions.  First of all I am using the Lab/Windows GUI builder and I want a multi line title as the column label.  Is this possible and if so, how would I do this?
I also want to receive data dynamically and stuff the string that I receive as a table entry.  Is it possible to have multiline strings as table entries?
Thanks,
Donna
0 Kudos
Message 1 of 4
(4,293 Views)
When using the UIR editor, you can obtain multi-line labels by pressing Ctrl+Enter to break the text. This is valid for text labels of all controls, including row and column header in a table.
 
In case of string cells, you should be able to obtain multi-line contents embedding '\n' inside the text string, for example:
strcpy (label, "This is a\nmulti-line label");
 
It is possible that you need to enlarge row height (I'm not in my office now and I don't remember at this moment if and how the table adapts to multi-line strings).


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(4,290 Views)

Thanks!  I tried it and you are right that Ctrl Enter works.  However, how do I change the size of the column title so that I can see the multiple lines that I entered as a Column Title?  Also, is there a way to change the height of each row of a table?

Thanks,

Donna

0 Kudos
Message 3 of 4
(4,284 Views)
Hi Donna,
 
to modify column header height in the UIR editor you must have row labels visible. Once you have row labels visible, simply move the mouse pointer on top of the label of row 1: it should become a double-arrow pointer (resizing pointer) and you can drag down with the mouse until the column headers are the desired size. To do it programmatically you can use SetCtrlAttribute with the attribute ATTR_COLUMN_LABELS_HEIGHT.
 
To change row height, either you can change in the UIR editor editing the single row and imposing the desired height (Row appearance box, size mode: Use explicit size) or you can do it at execution time using SetTableRowAttribute with the attribute ATTR_ROW_HEIGHT.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(4,275 Views)