Don,
Unless you use a fixed-with font, any kludge you come up with will be
inexact.  You may get pretty close to the actual width, but there will
always be times when you will over or under shoot the size.
And if you want to change font size, etc., you'll have to revisit your
algorithm or account for it up front.

Fortunately there is a function that will give you the dimensions of a
text rectangle.  It is "Get Text Rect.vi" and is located in the Picture
Control tools (Functions>>Graphics & Sound>>Picture Functions).  It
should be self-explanatory from there.

Good Luck,
Scott

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Don J Roth
Sent: Tuesday, March 02, 2004 10:40 AM
To: Info-LabVIEW Mailing List
Subject: Fwd: Table cell width: settable programattically in terms of
number of characters?


>Date: Tue, 02 Mar 2004 11:39:44 -0500
>To: "Info-LabVIEW Mailing List" <[EMAIL PROTECTED]>
>From: Don J Roth <[EMAIL PROTECTED]>
>Subject: 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


Reply via email to