LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Table cell width: settable programattically in terms of number of characters?

I am currently have a table control with column headers and I would like to have all of the cells of any particular column to have their widths equal to the number of characters in the header string of that column Is this possible to do programmatically?

Currently, I see the cell width and height may be settable (despite what property help says) but only in terms of pixels. I suppose I could determine the ratio of pixels to character size so as to cludge a way to come up with cell width in terms of number of characters. Any comments?

Thanks,

Don
0 Kudos
Message 1 of 3
(2,694 Views)

I all ready answered Don's Q on Info-LabVIEW.

For the record, his reply follows;

"
Worked great, especially after I added 10 pixels to the final result., thanks again, Don

At 11:52 AM 3/2/2004 -0500, you wrote:

Under the picture control functions there is a VI that let you put text
in a picture.

It lets you spec the string and font etc, and returns the size of the
text in pixels.

That should do it!

"get Text Rect.VI"

Ben

"

Ben


Ben Rayner
Certified LabVIEW Developer
www.DSAutomation.com

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,694 Views)
> I am currently have a table control with column headers and I would
> like to have all of the cells of any particular column to have their
> widths equal to the number of characters in the header string of that
> column Is this possible to do programmatically?
>
> Currently, I see the cell width and height may be settable (despite
> what property help says) but only in terms of pixels. I suppose I
> could determine the ratio of pixels to character size so as to cludge
> a way to come up with cell width in terms of number of characters.
> Any comments?
>

There is a VI in the picture control palette that will give the pixel
size of a text string at a given font size/name.

Greg McKaskle
0 Kudos
Message 3 of 3
(2,694 Views)