LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Auto size of table

Hello,
is there a property to automatically change the size of the columns in a table?
As you can see in the attached vi there is text in column 1 which is not completely visible.
Can this be resized with a property?

Thx for the help

0 Kudos
Message 1 of 35
(7,669 Views)
Use the Cell Size property for that particular column.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 2 of 35
(7,653 Views)

To my knowledge, there is no automatic solution to adapt the column width to the cell contents.

You can change programmatically the column width using the active cell/cell size property node.

Finding the right width is another story, since it depends on the font used. There is a graphic function in the Picture palette that get the size of a string : Get Text Rect. You could use it in combination with the cell size PN, assuming that you don't use fancy text attributes.

Chilly Charly    (aka CC)
Message 3 of 35
(7,652 Views)
That was fun ! Hope somebody will use it !..
 

Message Edité par chilly charly le 10-23-2007 02:05 PM

Chilly Charly    (aka CC)
Download All
Message 4 of 35
(7,638 Views)
Hi chilly charly,
this is what i am looking for. Perfect work.
What do i have to change so that there is a reference as input? I want to use this via as an subvi but i only have the reference to the table and not the tabel itself.
Thx again.
0 Kudos
Message 5 of 35
(7,632 Views)

OK. Here are the modifications. BTW, it was not necessary to wire the For loop N input. Rube Golberd code ?

Enjoy.

Message Edité par chilly charly le 10-23-2007 02:36 PM

Chilly Charly    (aka CC)
Download All
Message 6 of 35
(7,631 Views)
Works great.
Thank you very much for this VI.
0 Kudos
Message 7 of 35
(7,616 Views)

CC,

Is the Active Cell/Ccell Size property available only from LV 8.0 upwards? I didnt fid it in 7.1. Smiley Sad

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 8 of 35
(7,585 Views)


parthabe a écrit: Is the Active Cell/Ccell Size property available only from LV 8.0 upwards? I didnt fid it in 7.1.

Both properties were already available in LV 6. Get new glasses ! :D:D:D
Chilly Charly    (aka CC)
Message 9 of 35
(7,583 Views)
Hi CC,
 
is the cellfont property something that got introduced after 8.x? I can't find it in 7.0... and if it was available in 7.1 it would solve the problem here.
 
Jeff


Using Labview 7 Express
Message 10 of 35
(7,574 Views)